[pacman-dev] [PATCH 2/2] makepkg: correctly add changelog files

Dave Reisner dreisner at archlinux.org
Sun Dec 14 17:35:01 UTC 2014


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


More information about the pacman-dev mailing list