mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
pkgsubmit: Remove build function check
Closes: http://bugs.archlinux.org/task/19914 Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
7e3c624a69
commit
f08fbbe80e
1 changed files with 1 additions and 15 deletions
|
@ -112,10 +112,7 @@ if ($_COOKIE["AURSID"]):
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
# Now process the lines and put any var=val lines into the
|
# Now process the lines and put any var=val lines into the
|
||||||
# 'pkgbuild' array. Also check to make sure it has the build()
|
# 'pkgbuild' array.
|
||||||
# function.
|
|
||||||
#
|
|
||||||
$seen_build_function = 0;
|
|
||||||
while (list($k, $line) = each($lines)) {
|
while (list($k, $line) = each($lines)) {
|
||||||
# Neutralize parameter substitution
|
# Neutralize parameter substitution
|
||||||
$line = preg_replace('/\${(\w+)#(\w*)}?/', '$1$2', $line);
|
$line = preg_replace('/\${(\w+)#(\w*)}?/', '$1$2', $line);
|
||||||
|
@ -147,22 +144,11 @@ if ($_COOKIE["AURSID"]):
|
||||||
$lparts[1]);
|
$lparts[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
# Non variable assignment line. (comment, blank, command, etc)
|
|
||||||
if (preg_match('/\s*build\s*\(\)/', $line)) {
|
|
||||||
$seen_build_function = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# some error checking on PKGBUILD contents - just make sure each
|
# some error checking on PKGBUILD contents - just make sure each
|
||||||
# variable has a value. This does not do any validity checking
|
# variable has a value. This does not do any validity checking
|
||||||
# on the values, or attempts to fix line continuation/wrapping.
|
# on the values, or attempts to fix line continuation/wrapping.
|
||||||
#
|
|
||||||
if (!$seen_build_function) {
|
|
||||||
$error = __("Missing build function in PKGBUILD.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$req_vars = array("url", "pkgdesc", "license", "pkgrel", "pkgver", "arch", "pkgname");
|
$req_vars = array("url", "pkgdesc", "license", "pkgrel", "pkgver", "arch", "pkgname");
|
||||||
foreach ($req_vars as $var) {
|
foreach ($req_vars as $var) {
|
||||||
if (!array_key_exists($var, $pkgbuild)) {
|
if (!array_key_exists($var, $pkgbuild)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue