diff --git a/debian/changelog b/debian/changelog index e462a3e..2010d8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 25 Apr 2009 21:13:03 +0100 + -- Neil Williams Sat, 25 Apr 2009 23:15:36 +0100 emdebian-rootfs (1.9.0) unstable; urgency=low diff --git a/embootstrap b/embootstrap index 03d7605..eb4c6d2 100755 --- a/embootstrap +++ b/embootstrap @@ -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