[pacman-dev] [PATCH] makepkg: change to pkgdir before creating PKGINFO file

Allan McRae allan at archlinux.org
Sat Aug 8 05:24:47 EDT 2009


Commit 01f9ae63 moved that creation of the PKGINFO file to before changing
to pkgdir.  This causes issues when using the -R option (FS#15851).

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/makepkg.sh.in |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 94779bc..daa9585 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -953,6 +953,9 @@ create_package() {
 		exit 1 # $E_MISSING_PKGDIR
 	fi
 
+	cd "$pkgdir"
+	msg "$(gettext "Creating package...")"
+
 	if [ -z "$1" ]; then
 		nameofpkg="$pkgname"
 	else
@@ -961,9 +964,6 @@ create_package() {
 
 	write_pkginfo $nameofpkg
 
-	cd "$pkgdir"
-	msg "$(gettext "Creating package...")"
-
 	local comp_files=".PKGINFO"
 
 	# check for an install script
-- 
1.6.4



More information about the pacman-dev mailing list