FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-23-2012, 02:44 PM
Allan McRae
 
Default 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>
---
scripts/makepkg.sh.in | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index df1823d..e247cad 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1716,7 +1716,7 @@ write_pkginfo() {
echo "# using $(fakeroot -v)"
fi
echo "# $(LC_ALL=C date -u)"
- printf "pkgname = %s
" "$1"
+ printf "pkgname = %s
" "$pkgname"
(( SPLITPKG )) && echo pkgbase = $pkgbase
echo "pkgver = $(get_full_version)"
printf "pkgdesc = %s
" "$pkgdesc"
@@ -1787,18 +1787,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')

@@ -1818,7 +1811,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"
@@ -2327,7 +2320,7 @@ run_split_packaging() {
backup_package_variables
run_package $pkgname
tidy_install
- create_package $pkgname
+ create_package
restore_package_variables
pkgdir="${pkgdir%/*}"
done
--
1.7.12.1
 

Thread Tools




All times are GMT. The time now is 06:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org