SVN: toys/tools/cleanbuild/cleanbuild
sparky
sparky at pld-linux.org
Tue Feb 23 15:10:59 CET 2010
Author: sparky
Date: Tue Feb 23 15:10:58 2010
New Revision: 11165
Modified:
toys/tools/cleanbuild/cleanbuild
Log:
- added --debug option
Modified: toys/tools/cleanbuild/cleanbuild
==============================================================================
--- toys/tools/cleanbuild/cleanbuild (original)
+++ toys/tools/cleanbuild/cleanbuild Tue Feb 23 15:10:58 2010
@@ -7,6 +7,7 @@
SUFFIX=""
CACHEDIR="$PWD/poldekcache"
IGNORE=""
+NODEBUG=true
[ -r .cleanbuildrc ] && . .cleanbuildrc
@@ -88,6 +89,9 @@
--cleanafter | -ca)
CLEANAFTER=true
;;
+ --debug)
+ NODEBUG=false
+ ;;
-[a-z])
SUFFIX="$OPT"
;;
@@ -109,6 +113,8 @@
builder_options="$*"
fi
+$NODEBUG || set -x
+
CHNAME="chroot-$DEST$SUFFIX"
CHDIR="$PWD/$CHNAME"
CHHOME="/home/users/$USER"
@@ -203,6 +209,7 @@
poldek()
{
+ $NODEBUG || set -x
rebuilddb
/usr/bin/poldek $SRC -s "$RPMS_FROM" -r "$CHDIR" "--cachedir=$CACHEDIR" --conf=$PWD/poldekconf/poldek.conf "$@"
}
@@ -233,6 +240,7 @@
{
title "preparing chroot"
set -e
+ $NODEBUG || set -x
mkdir $CHDIR
mount -t tmpfs -o size=8G,relatime /dev/null $CHDIR
echo $$ > $CHDIR/.pid
@@ -266,6 +274,7 @@
build_mount_home()
{
+ $NODEBUG || set -x
mount -o bind $HOME/rpm $CHDIR/$CHHOME/rpm
}
@@ -352,12 +361,14 @@
{
info "Fetching $build_pkg"
title "fetch"
+ $NODEBUG || set -x
su $USER -c "$HOME/rpm/packages/builder -g $build_pkg $builder_options" \
|| die 11 "Fetch failed"
}
create()
{
+ $NODEBUG || set -x
su $USER -c "poldek -s $RPMS_FROM --mkidx"
if [ ! -d $CHDIR ]; then
More information about the pld-cvs-commit
mailing list