[pacman-dev,07/10] makepkg: Make pkgdir a local

Message ID 30e88ecca380f3109efc414aa404de78c1e9c32f.1527783895.git.jan.steffens@gmail.com
State Superseded, archived
Headers show
Series [pacman-dev,01/10] libmakepkg/util/option: Refactor checking to reduce code duplication | expand

Commit Message

Jan Alexander Steffens May 31, 2018, 4:24 p.m. UTC
Causes it to be reset (to $pkgdirbase/$pkgbase) between subpackages.
This shouldn't be visible.
---
 scripts/makepkg.sh.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 84ae08db..27f627ac 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -774,13 +774,13 @@  create_package() {
 }
 
 create_debug_package() {
+	local pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
+
 	# check if a debug package was requested
 	if ! check_option "debug" "y" || ! check_option "strip" "y"; then
 		return
 	fi
 
-	pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
-
 	# check if we have any debug symbols to package
 	if dir_is_empty "$pkgdir/usr/lib/debug"; then
 		return
@@ -1122,7 +1122,7 @@  backup_package_variables() {
 }
 
 run_solo_packaging() {
-	pkgdir="$pkgdirbase/$pkgname"
+	local pkgdir="$pkgdirbase/$pkgname"
 	mkdir "$pkgdir"
 	if [[ -n $1 ]] || (( PKGFUNC )); then
 		run_package $1