summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-09-24 00:06:36 +1000
committerAllan McRae <allan@archlinux.org>2012-11-27 15:16:15 +1000
commita5e81f55993c1be170c73b78b4281845e127a6f3 (patch)
treeab2b040b72b58293dc4922480c2429f671569f64 /scripts/makepkg.sh.in
parentbd4ff4a377ce32e36e5b72bd60c0b3a59e194720 (diff)
downloadpacman-a5e81f55993c1be170c73b78b4281845e127a6f3.tar.xz
makepkg: output the name of the package being created
Although it should be currently quite obvious what package is being created when "Creating package..." is printed, it will not be in the future when a debug package is potentially created too. Also, given $pkgname is always correctly set when split packaging now, we no longer need to pass that around. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in17
1 files changed, 5 insertions, 12 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 9c31da4e..cbc6ff2c 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1719,7 +1719,7 @@ write_pkginfo() {
echo "# using $(fakeroot -v)"
fi
echo "# $(LC_ALL=C date -u)"
- printf "pkgname = %s\n" "$1"
+ printf "pkgname = %s\n" "$pkgname"
(( SPLITPKG )) && echo pkgbase = $pkgbase
echo "pkgver = $(get_full_version)"
printf "pkgdesc = %s\n" "$pkgdesc"
@@ -1790,18 +1790,11 @@ create_package() {
check_package
cd_safe "$pkgdir"
- msg "$(gettext "Creating package...")"
-
- local nameofpkg
- if [[ -z $1 ]]; then
- nameofpkg="$pkgname"
- else
- nameofpkg="$1"
- fi
+ msg "$(gettext "Creating package \"%s\"...")" "$pkgname"
pkgarch=$(get_pkg_arch)
- write_pkginfo $nameofpkg > .PKGINFO
+ write_pkginfo > .PKGINFO
local comp_files=('.PKGINFO')
@@ -1821,7 +1814,7 @@ create_package() {
msg2 "$(gettext "Compressing package...")"
local fullver=$(get_full_version)
- local pkg_file="$PKGDEST/${nameofpkg}-${fullver}-${pkgarch}${PKGEXT}"
+ local pkg_file="$PKGDEST/${pkgname}-${fullver}-${pkgarch}${PKGEXT}"
local ret=0
[[ -f $pkg_file ]] && rm -f "$pkg_file"
@@ -2338,7 +2331,7 @@ run_split_packaging() {
backup_package_variables
run_package $pkgname
tidy_install
- create_package $pkgname
+ create_package
restore_package_variables
pkgdir="${pkgdir%/*}"
done