From 36c6c6394d1d39ea79a03f4861c5c9cf66829003 Mon Sep 17 00:00:00 2001 From: dancer Date: Sat, 26 Jul 2003 22:51:34 +0000 Subject: + * pbuilder-user-mode-linux: support --distribution flag for + pbuilder-user-mode-linux + #176095 + --- pbuilder-user-mode-linux | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pbuilder-user-mode-linux') diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index e2d3d9f..c96eed7 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -101,9 +101,11 @@ chroot ${UML_CHROOT_MOUNTPOINT} /tmp/chrootshell #some variables need to be set from outside values, possibly export PATH=/sbin:/bin:/usr/sbin:/usr/bin export TMPDIR=/tmp -EXTRAOPT= +unset EXTRAOPT +declare -a EXTRAOPT if [ -n "${UML_DISTRIBUTION}" ]; then - EXTRAOPT="--distribution ${UML_DISTRIBUTION}" + EXTRAOPT[0]="--distribution" + EXTRAOPT[1]="${UML_DISTRIBUTION}" fi if [ -z "${UML_BUILDRESULT}" ]; then BUILDRESULT= @@ -113,7 +115,7 @@ else mkdir -p ${UML_CHROOT_BUILDRESULTMOUNTDIR} || true mount -t hostfs none "${UML_CHROOT_BUILDRESULTMOUNTDIR}" -o "${UML_BUILDRESULT}" fi -pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE} +pbuilder "$1" ${UML_EXTRAOPT} \${EXTRAOPT[@]} --buildresult "\${BUILDRESULT}" --buildplace "${UML_CHROOT_MOUNTPOINT}" --internal-build-uml ${BUILDING_DSC_FILE} echo \$? > /proc/exitcode EOF @@ -242,6 +244,11 @@ case "${OPERATION}" in operate_uml execute ;; create) + if [ ! -d ~/.pbuilder-user-mode-linux ]; then + mkdir ~/.pbuilder-user-mode-linux + fi + cd ~/.pbuilder-user-mode-linux + sed "s/dist=.*/dist=${UML_DISTRIBUTION}/" /etc/rootstrap/rootstrap.conf|lv > rootstrap.conf rootstrap -s 1000 ${PBUILDER_UML_IMAGE} operate_uml update ;; -- cgit v1.2.3