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-05-2008, 01:48 AM
Dan McGee
 
Default makepkg: save and restore shell options before and after build()

Fix the issue uncovered by FS#12344. In this instance, the dotglob shopt was
being set in the build() function but never cleared, causing issues in the
remaining parts of the makepkg script.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
scripts/makepkg.sh.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 4cc255c..25e4cc8 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -675,6 +675,8 @@ run_build() {

# ensure all necessary build variables are exported
export CFLAGS CXXFLAGS MAKEFLAGS CHOST
+ # save our shell options so build() can't override what we need
+ local $shellopts=$(shopts -p)

local ret=0
if [ "$LOGGING" = "1" ]; then
@@ -695,6 +697,8 @@ run_build() {
else
build 2>&1 || ret=$?
fi
+ # reset our shell options
+ eval "$shellopts"

if [ $ret -gt 0 ]; then
error "$(gettext "Build Failed.")"
--
1.6.0.4

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 05:20 AM.

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