aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-user-mode-linux
diff options
context:
space:
mode:
authordancer <dancer>2003-07-26 22:51:34 +0000
committerdancer <dancer>2003-07-26 22:51:34 +0000
commit36c6c6394d1d39ea79a03f4861c5c9cf66829003 (patch)
tree23df06a0e8652ced6b0a18c7882e5e23eb9d07d5 /pbuilder-user-mode-linux
parentc9aa351f90bb093223c9b06b50c6ac587cb0f0d4 (diff)
downloadpbuilder-36c6c6394d1d39ea79a03f4861c5c9cf66829003.tar
pbuilder-36c6c6394d1d39ea79a03f4861c5c9cf66829003.tar.gz
+ * pbuilder-user-mode-linux: support --distribution flag for
+ pbuilder-user-mode-linux + #176095 +
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-xpbuilder-user-mode-linux13
1 files changed, 10 insertions, 3 deletions
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
;;