[pacman-dev] [PATCH 04/10] makepkg: Pull out single-package packaging

Jan Alexander Steffens (heftig) jan.steffens at gmail.com
Thu May 31 16:24:49 UTC 2018


Put this into a new function close to run_split_packaging so similar
code is nearby.
---
 scripts/makepkg.sh.in | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 4684e444..f8f43540 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1121,6 +1121,18 @@ backup_package_variables() {
 	done
 }
 
+run_solo_packaging() {
+	pkgdir="$pkgdirbase/$pkgname"
+	mkdir "$pkgdir"
+	if (( PKGFUNC )); then
+		run_package
+	fi
+	tidy_install
+	lint_package || exit $E_PACKAGE_FAILED
+	create_package
+	create_debug_package
+}
+
 run_split_packaging() {
 	local pkgname_backup=("${pkgname[@]}")
 	local restore_package_variables
@@ -1537,15 +1549,7 @@ if (( INFAKEROOT )); then
 
 	chmod 755 "$pkgdirbase"
 	if (( ! SPLITPKG )); then
-		pkgdir="$pkgdirbase/$pkgname"
-		mkdir "$pkgdir"
-		if (( PKGFUNC )); then
-			run_package
-		fi
-		tidy_install
-		lint_package || exit $E_PACKAGE_FAILED
-		create_package
-		create_debug_package
+		run_solo_packaging
 	else
 		run_split_packaging
 	fi
-- 
2.17.0


More information about the pacman-dev mailing list