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-20-2011, 02:11 PM
Florian Pritz
 
Default makepkg: output commands ran in build/check/package functions

This might help to locate a failing command which causes makepkg to
abort.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
---
This is a request for comments and not a final patch. It's only been tested shortly.
I just want to know if people like the idea.

scripts/makepkg.sh.in | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 6304a25..409c4cc 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -851,6 +851,7 @@ extract_sources() {
}

error_function() {
+ set +x
if [[ -p $logpipe ]]; then
rm "$logpipe"
fi
@@ -912,7 +913,9 @@ run_function() {

restoretrap=$(trap -p ERR)
trap 'error_function $pkgfunc' ERR
+ set -x
$pkgfunc &>"$logpipe"
+ set +x
eval $restoretrap

wait $teepid
@@ -920,7 +923,9 @@ run_function() {
else
restoretrap=$(trap -p ERR)
trap 'error_function $pkgfunc' ERR
+ set -x
$pkgfunc 2>&1
+ set +x
eval $restoretrap
fi
# reset our shell options
--
1.7.6.1
 

Thread Tools




All times are GMT. The time now is 11:04 AM.

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