mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
d428da4780
commit
bfea8b29ad
1 changed files with 6 additions and 0 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue