Before this, we'd see bizzare behavior of:

  -> Adding changelog file (systemd.install)...

And, changelog files in the global section would not be added at all.

The code is clearly wrong here, as it references 'install' within a
loop of 'changelog' and 'install'. Let's use parameter indirection to
ensure that the proper file is identified and added.
---
 scripts/makepkg.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 771aa72..33dff24 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2367,7 +2367,7 @@ create_srcpackage() {
        for i in 'changelog' 'install'; do
                local file files
 
-               [[ $install ]] && files+=("$install")
+               [[ ${!i} ]] && files+=("${!i}")
                for name in "${pkgname[@]}"; do
                        if extract_function_var "package_$name" "$i" 0 file; 
then
                                files+=("$file")
-- 
2.1.3

Reply via email to