[Pkg-xfce-commits] r531 - in scripts: . pbuilder
Emanuele Rocca
ema at costa.debian.org
Mon Apr 17 22:24:27 UTC 2006
Author: ema
Date: 2006-04-17 22:24:26 +0000 (Mon, 17 Apr 2006)
New Revision: 531
Modified:
scripts/get-sources.pl
scripts/pbuilder/pdebuild-sources.sh
scripts/pbuilder/pdebuild.conf
scripts/pbuilder/pdebuild.wrapper
Log:
get-sources.pl
- nicer error on "no tarball dir" in get-sources.pl
pbuilder/
- use $HOME
- check for needed executables before starting pbuilder create/update
Modified: scripts/get-sources.pl
===================================================================
--- scripts/get-sources.pl 2006-04-17 21:22:36 UTC (rev 530)
+++ scripts/get-sources.pl 2006-04-17 22:24:26 UTC (rev 531)
@@ -31,7 +31,7 @@
}
my $tarballs_dir = "$debian_dirs/tarballs";
-! -d $tarballs_dir and print STDERR "E: No tarballs dir found. Exiting.\n" and exit 1;
+! -d $tarballs_dir and print STDERR "E: No tarballs dir ($tarballs_dir) found. Exiting.\n" and exit 1;
if (! -f $sources_file or ! open SOURCES, "< $sources_file") {
print STDERR "E: No sources file found. Exiting.\n";
Modified: scripts/pbuilder/pdebuild-sources.sh
===================================================================
--- scripts/pbuilder/pdebuild-sources.sh 2006-04-17 21:22:36 UTC (rev 530)
+++ scripts/pbuilder/pdebuild-sources.sh 2006-04-17 22:24:26 UTC (rev 531)
@@ -1,10 +1,10 @@
#!/bin/sh
-# Copyright (C) 2005 Emanuele Rocca <ema at debian.org>
+# Copyright (C) 2005 2006 Emanuele Rocca <ema at debian.org>
# This code is released under the terms of the GNU GPL
#
# vim:textwidth=0
-BASEDIR=/home/ema/debian/pkg-xfce
+BASEDIR=$HOME/debian/pkg-xfce
CONFFILE=$BASEDIR/scripts/pbuilder/pdebuild.conf
. $CONFFILE
@@ -13,6 +13,16 @@
SCRIPTSDIR=$BASEDIR/scripts
PKGFILE=$SCRIPTSDIR/desktop-build.txt
+# Rough check for needed executables
+NEEDEDBINS='/usr/sbin/pbuilder /usr/sbin/debootstrap
+ /usr/bin/fakeroot /usr/bin/svn-buildpackage'
+for bin in $NEEDEDBINS; do
+ if [ ! -x $bin ]; then
+ echo "$bin is missing. Exiting." > /dev/stderr
+ exit
+ fi
+done
+
[ -d "$BUILDPLACE" ] || mkdir -p "$BUILDPLACE"
[ -d "$PBUILDERDIR/log" ] || mkdir -p "$PBUILDERDIR/log"
@@ -25,10 +35,11 @@
echo "Updating base.tgz"
sudo $PBUILDER update --debug \
--configfile $CONFFILE > $PBUILDERDIR/log/pbuilder-update.log \
- 2> $PBUILDERDIR/log/pbuilder-update-errors.log
+ 2> $PBUILDERDIR/log/pbuilder-update-errors.log
fi
-for pkg in $(cat $PKGFILE); do
+# Build every package listed in $PKGFILE (avoiding comments)
+for pkg in $(grep -v "^#" $PKGFILE); do
echo "Building $pkg..."
cd $DESKTOPDIR/$pkg
svn-buildpackage --svn-ignore-new --svn-builder $SCRIPTSDIR/pbuilder/pdebuild.wrapper
Modified: scripts/pbuilder/pdebuild.conf
===================================================================
--- scripts/pbuilder/pdebuild.conf 2006-04-17 21:22:36 UTC (rev 530)
+++ scripts/pbuilder/pdebuild.conf 2006-04-17 22:24:26 UTC (rev 531)
@@ -1,6 +1,6 @@
# read pbuilderrc.5 document for notes on specific options.
-BASEDIR=/home/ema/debian/pkg-xfce
+BASEDIR=$HOME/debian/pkg-xfce
PBUILDERDIR=$BASEDIR/scripts/pbuilder/xfce
BASETGZ=$PBUILDERDIR/base.tgz
Modified: scripts/pbuilder/pdebuild.wrapper
===================================================================
--- scripts/pbuilder/pdebuild.wrapper 2006-04-17 21:22:36 UTC (rev 530)
+++ scripts/pbuilder/pdebuild.wrapper 2006-04-17 22:24:26 UTC (rev 531)
@@ -1,6 +1,6 @@
#!/bin/sh
-D=/home/ema/debian/pkg-xfce/scripts/pbuilder
+D=$HOME/debian/pkg-xfce/scripts/pbuilder
pdebuild --configfile $D/pdebuild.conf \
--logfile $D/xfce/log/`basename $(pwd)`-buildd.log \
More information about the Pkg-xfce-commits
mailing list