[packages/rpm-pld-macros/rpm.org] - add conversion from PLD rich noauto deps to poor rpm.org implementation

Jan Palus atler at pld-linux.org
Fri Feb 12 01:21:10 CET 2021


On 31.01.2021 20:52, baggins wrote:
> commit 260cc2eb0ed6d678e77ffc27c124fd5c06dfced4
> Author: Jan Rękorajski <baggins at pld-linux.org>
> Date:   Sun Jan 31 20:50:47 2021 +0100
> 
>     - add conversion from PLD rich noauto deps to poor rpm.org implementation

This commit causes serious regression -- autoreqs and autoprovs are
completely gone.

> +%__noautodep_helper() %(awk -v x="%*" 'BEGIN {
> +	RS = "\n([ \t]+\n)+";
> +	FS = " ";
> +	split(x, F);
> +	printf("(");
> +	for (i=1; i<=length(F); i++) {
> +		s = F[i];
> +		sub(/#.*/, "z&z", s);
> +		if (s ~ /^$/) { continue; };
> +		printf(s);
> +		if (i != length(F)) { printf("|"); };
> +	};
> +	printf(")");
> +}')

Looks like it's because of pattern being '()' on empty input hence
matching everything. I suppose whole block starting with first printf
should be guarded by condition length(F) > 0.


More information about the pld-devel-en mailing list