summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-01-17 10:54:55 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-01-17 11:35:04 +0100
commitbfea8b29ad01e72f2c694742084778d112fb300a (patch)
treeeedbc6e887f45cb69f95a7e497c908328bb65024 /web
parentd428da47806217f5336bfa36adf0f321d243e37b (diff)
downloadaur-bfea8b29ad01e72f2c694742084778d112fb300a.tar.gz
aur-bfea8b29ad01e72f2c694742084778d112fb300a.tar.xz
Detect split packages from .AURINFO
There is an extension to the .AURINFO format that supports split packages. Since there is no support for split packages in the AUR so far, add a check to identify these cases. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/pkgsubmit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 7ae0c1c2..6503c0b2 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -262,6 +262,7 @@ if ($uid):
# Parse .AURINFO and overwrite PKGBUILD fields accordingly
unset($pkg_version);
$depends = array();
+ $srcinfo_pkgname_count = 0;
foreach (explode("\n", $srcinfo_raw) as $line) {
$line = trim($line);
if (empty($line) || $line[0] == '#') {
@@ -270,6 +271,11 @@ if ($uid):
list($key, $value) = explode(' = ', $line, 2);
switch ($key) {
case 'pkgname':
+ $srcinfo_pkgname_count++;
+ if ($srcinfo_pkgname_count > 1) {
+ $error = __("Error - The AUR does not support split packages!");
+ }
+ /* Fall-through case. */
case 'pkgdesc':
case 'url':
case 'license':