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.
* 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

View file

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