Add complaint when workingdir is not set in /etc/emsource.conf (Closes: #521474)

git-svn-id: http://emdebian.org/svn/current@5871 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2009-04-25 22:27:43 +00:00
parent f906426cb4
commit 2257531920
2 changed files with 26 additions and 17 deletions

4
debian/changelog vendored
View file

@ -2,8 +2,10 @@ emdebian-rootfs (2.0.0) unstable; urgency=low
* Debian release. * Debian release.
* Add Recommends: on gcc so that dpkg-architecture works properly. * Add Recommends: on gcc so that dpkg-architecture works properly.
* Add complaint when workingdir is not set in /etc/emsource.conf
(Closes: #521474)
-- Neil Williams <codehelp@debian.org> Sat, 25 Apr 2009 21:13:03 +0100 -- Neil Williams <codehelp@debian.org> Sat, 25 Apr 2009 23:15:36 +0100
emdebian-rootfs (1.9.0) unstable; urgency=low emdebian-rootfs (1.9.0) unstable; urgency=low

View file

@ -61,6 +61,8 @@ WORK=$CWD
get_work_dir get_work_dir
BUILDPLACE=$WORKDIR BUILDPLACE=$WORKDIR
WORKDIR=`echo ${WORKDIR}/ | tr -s \/`
echo "Using '$WORKDIR' as the Emdebian working directory."
BASETGZ="$BUILDPLACE/emdebian.tgz" BASETGZ="$BUILDPLACE/emdebian.tgz"
BASETGZ=`echo $BASETGZ | tr -s \/` BASETGZ=`echo $BASETGZ | tr -s \/`
BUILDPLACE="$BUILDPLACE/pbuilder" BUILDPLACE="$BUILDPLACE/pbuilder"
@ -70,19 +72,19 @@ MIRROR=
# don't die if the user has set 'None' for the dpkg-cross default. # don't die if the user has set 'None' for the dpkg-cross default.
get_default_arch get_default_arch
BUILDPLACE="${WORKDIR}/pbuilder/build" BUILDPLACE="${WORKDIR}pbuilder/build"
if [ -d $BUILDPLACE ]; then if [ -d $BUILDPLACE ]; then
rm -rf $BUILDPLACE/* rm -rf $BUILDPLACE/*
fi fi
if [ ! -d $BUILDPLACE ]; then if [ ! -d $BUILDPLACE ]; then
mkdir -p $BUILDPLACE mkdir -p $BUILDPLACE
fi fi
BASETGZ="${WORKDIR}/emdebian.tgz" BASETGZ="${WORKDIR}emdebian.tgz"
SUITE=unstable SUITE=unstable
CROSS=x CROSS=x
MACHINE=x MACHINE=x
VARIANT=x VARIANT=x
MACHINEPATH="${WORKDIR}/machine/" MACHINEPATH="${WORKDIR}machine/"
USEDEVPTS="yes" USEDEVPTS="yes"
USEPROC="yes" USEPROC="yes"
@ -96,7 +98,7 @@ case "$1" in
;; ;;
--testing|testing) --testing|testing)
shift; shift;
BASETGZ="${WORKDIR}/emdebian-testing.tgz" BASETGZ="${WORKDIR}emdebian-testing.tgz"
SUITE=testing SUITE=testing
echo "Creating an embootstrap testing chroot" echo "Creating an embootstrap testing chroot"
;; ;;
@ -108,7 +110,7 @@ case "$1" in
;; ;;
--cross|cross) --cross|cross)
shift; shift;
BASETGZ="${WORKDIR}/emdebian-$ARCH.tgz" BASETGZ="${WORKDIR}emdebian-$ARCH.tgz"
CROSS=$ARCH CROSS=$ARCH
echo "Creating an embootstrap $ARCH chroot" echo "Creating an embootstrap $ARCH chroot"
;; ;;
@ -124,16 +126,17 @@ case "$1" in
;; ;;
--machine-path) --machine-path)
shift shift
MACHINEPATH=$1 MACHINEPATH="$1/"
MACHINEPATH=`echo $MACHINEPATH | tr -s \/`
shift shift
;; ;;
--machine) --machine)
shift shift
MACHINE=$1 MACHINE=$1
VARIANT=default VARIANT=default
if [ ! -d "${MACHINEPATH}/$MACHINE" ]; then if [ ! -d "${MACHINEPATH}$MACHINE" ]; then
echo "Cannot find '${MACHINEPATH}/$MACHINE'." echo "Cannot find machine directory: '${MACHINEPATH}$MACHINE'."
exit exit 4
fi fi
shift shift
;; ;;
@ -142,11 +145,11 @@ case "$1" in
VARIANT=$1 VARIANT=$1
if [ ! $MACHINE ]; then if [ ! $MACHINE ]; then
echo "Variant specified without a machine." echo "Variant specified without a machine."
exit exit 3
fi fi
if [ ! -d "${MACHINEPATH}/$MACHINE/$VARIANT" ]; then if [ ! -d "${MACHINEPATH}$MACHINE/$VARIANT" ]; then
echo "Cannot find '${MACHINEPATH}/$MACHINE/$VARIANT'." echo "Cannot find variant directory: '${MACHINEPATH}$MACHINE/$VARIANT'."
exit exit 3
fi fi
shift shift
;; ;;
@ -160,14 +163,18 @@ done
if [ "$ARCH" = "None.\n" ]; then if [ "$ARCH" = "None.\n" ]; then
echo $ARCH echo $ARCH
echo Use the --arch option or dpkg-reconfigure dpkg-cross echo Use the --arch option or dpkg-reconfigure dpkg-cross
exit exit 2
fi fi
# include packages.conf if --machine used. # include packages.conf if --machine used.
if [ "$MACHINE" != "x" -a "$VARIANT" != "x" -a $CROSS -a $CROSS = $ARCH ]; then if [ "$MACHINE" != "x" -a "$VARIANT" != "x" -a $CROSS -a $CROSS = $ARCH ]; then
# sets INCLUDE, SCRIPT, MIRROR etc. # sets INCLUDE, SCRIPT, MIRROR etc.
if [ -f ${MACHINEPATH}/$MACHINE/$VARIANT/packages.conf ]; then FILE="${MACHINEPATH}$MACHINE/$VARIANT/packages.conf"
. ${MACHINEPATH}/$MACHINE/$VARIANT/packages.conf if [ -f $FILE ]; then
. $FILE
else
echo "ERROR: Cannot find machine support: $FILE"
exit 1
fi fi
echo "Using $MACHINE:$VARIANT" echo "Using $MACHINE:$VARIANT"
if [ $TARBALL_NAME ]; then if [ $TARBALL_NAME ]; then