[aur-dev] [PATCH/RFC 3/6] Detect split packages from .AURINFO

Dave Reisner d at falconindy.com
Fri Jan 17 11:28:29 EST 2014


On Fri, Jan 17, 2014 at 11:46:26AM +0100, Lukas Fleischer wrote:
> 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 at cryptocrack.de>
> ---
>  web/html/pkgsubmit.php | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
> index 7ae0c1c..6503c0b 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. */

This should let folks get rid of hacks like 'true && pkgname=(...)', but
now they'll need to fudge the .AURINFO file by removing any package
after the first. Could we instead just warn that we detected a split
PKGBUILD and simply merge the first found package into the pkgbase and
ignore the rest?

>  			case 'pkgdesc':
>  			case 'url':
>  			case 'license':
> -- 
> 1.8.5.3
> 


More information about the aur-dev mailing list