On 06/08/2018 02:18 PM, morganamilo wrote: > When a split package overriddes an array using += and the array does not > exist globally, makepkg --printsrcinfo will print the field with an > empty vlaue before printing the acual values. > > For exampple: having `depends+=(foo bar)` will generate: > depends = > depends = foo > depends = bar > > Explicity check for empty array values and only print the values that > are not empty. > > Signed-off-by: morganamilo <morganam...@gmail.com> > --- > scripts/libmakepkg/srcinfo.sh.in | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/scripts/libmakepkg/srcinfo.sh.in > b/scripts/libmakepkg/srcinfo.sh.in > index 509c4860..6a49be37 100644 > --- a/scripts/libmakepkg/srcinfo.sh.in > +++ b/scripts/libmakepkg/srcinfo.sh.in > @@ -44,7 +44,11 @@ srcinfo_write_attr() { > attrvalues=("${attrvalues[@]#[[:space:]]}") > attrvalues=("${attrvalues[@]%[[:space:]]}") > > - printf "\t$attrname = %s\n" "${attrvalues[@]}" > + for val in "${attrvalues[@]}"; do > + if [[ ! -z ${val// /} ]]; then > + printf "\t$attrname = %s\n" "$val" > + fi > + done
This is odd, I wonder why get_pkgbuild_attribute is returning an array=('' foo bar) in this case? We should probably fix it more directly. -- Eli Schwartz Bug Wrangler and Trusted User
signature.asc
Description: OpenPGP digital signature