[pacman-dev] [PATCH] makepkg: do not run prepare() and pkgver() with --repackage

Allan McRae allan at archlinux.org
Mon Jan 25 05:24:39 UTC 2016


Bug introduced with commit 8454daa7.

Reported-by: Zuyi Hu <hzy068808 at gmail.com>
Signed-off-by: Allan McRae <allan at archlinux.org>
---
 scripts/makepkg.sh.in | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 753621b..80b95f4 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2192,28 +2192,30 @@ mkdir -p "$srcdir"
 chmod a-s "$srcdir"
 cd_safe "$srcdir"
 
-if (( NOEXTRACT && ! VERIFYSOURCE )); then
-	warning "$(gettext "Using existing %s tree")" "\$srcdir/"
-elif (( !REPKG )); then
-	download_sources
-	check_source_integrity
-	(( VERIFYSOURCE )) && exit 0 # $E_OK
+if (( !REPKG )); then
+	if (( NOEXTRACT && ! VERIFYSOURCE )); then
+		warning "$(gettext "Using existing %s tree")" "\$srcdir/"
+	else
+		download_sources
+		check_source_integrity
+		(( VERIFYSOURCE )) && exit 0 # $E_OK
 
-	if (( CLEANBUILD )); then
-		msg "$(gettext "Removing existing %s directory...")" "\$srcdir/"
-		rm -rf "$srcdir"/*
-	fi
+		if (( CLEANBUILD )); then
+			msg "$(gettext "Removing existing %s directory...")" "\$srcdir/"
+			rm -rf "$srcdir"/*
+		fi
 
-	extract_sources
-fi
+		extract_sources
+	fi
 
-if (( PKGVERFUNC )); then
-	update_pkgver
-	basever=$(get_full_version)
-	check_build_status
-fi
-if (( PREPAREFUNC )); then
-	run_prepare
+	if (( PKGVERFUNC )); then
+		update_pkgver
+		basever=$(get_full_version)
+		check_build_status
+	fi
+	if (( PREPAREFUNC )); then
+		run_prepare
+	fi
 fi
 
 if (( NOBUILD )); then
-- 
2.7.0


More information about the pacman-dev mailing list