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

Message ID 86e4972774734d8fc45ba26d946b21bfc6fec41e.1529440441.git.jan.steffens@gmail.com
State New
Headers show
Series
  • [pacman-dev,1/6] libmakepkg/util/option: Refactor checking to reduce code duplication
Related show

Commit Message

Jan Alexander Steffens (heftig) June 19, 2018, 8:34 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 70a83a40..ceca55dd 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -775,13 +775,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 0
 	fi
 
-	pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
-
 	# check if we have any debug symbols to package
 	if dir_is_empty "$pkgdir/usr/lib/debug"; then
 		return 0
@@ -1123,7 +1123,7 @@  backup_package_variables() {
 }
 
 run_solo_packaging() {
-	pkgdir="$pkgdirbase/$pkgname"
+	local pkgdir="$pkgdirbase/$pkgname"
 	mkdir "$pkgdir"
 	if [[ -n $1 ]] || (( PKGFUNC )); then
 		run_package $1