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 12-25-2010, 02:17 AM
Allan McRae
 
Default makepkg: allow pkgname usage in split package functions

Currently, using $pkgname in a split package package_*() function
always returns the first value in the pkgname array rather than the
name of tha package being packaged. Fix this so $pkgname gives the
expected value.

Fixes FS#22174

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

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 7042e76..5ac71ed 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1414,17 +1414,19 @@ restore_package_variables() {
}

run_split_packaging() {
- for pkg in ${pkgname[@]}; do
- pkgdir="$pkgdir/$pkg"
+ local pkgname_backup=${pkgname[@]}
+ for pkgname in ${pkgname_backup[@]}; do
+ pkgdir="$pkgdir/$pkgname"
mkdir -p "$pkgdir"
chmod a-s "$pkgdir"
backup_package_variables
- run_package $pkg
+ run_package $pkgname
tidy_install
- create_package $pkg
+ create_package $pkgname
restore_package_variables
pkgdir="${pkgdir%/*}"
done
+ pkgname=${pkgname_backup[@]}
}

# Canonicalize a directory path if it exists
--
1.7.3.4
 

Thread Tools




All times are GMT. The time now is 03:10 AM.

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