diff options
author | dancer <dancer> | 2002-09-16 05:55:23 +0000 |
---|---|---|
committer | dancer <dancer> | 2002-09-16 05:55:23 +0000 |
commit | e542630eab0afa93c70a8ea001c34e6d9ebaedd1 (patch) | |
tree | 8049ff2ef7f19a262970e9c3c96ce440e044729c /pbuilder-modules | |
parent | f8032f66b4aac34758b9664fd28bba8f651145b4 (diff) | |
download | pbuilder-e542630eab0afa93c70a8ea001c34e6d9ebaedd1.tar pbuilder-e542630eab0afa93c70a8ea001c34e6d9ebaedd1.tar.gz |
+ * pbuilder-user-mode-linux (BUILDING_DSC_FILE): use --internal-build-uml
+
+ * pbuilder-modules (extractbuildplace): change to do less things
+ when INTERNAL_BUILD_UML is specified.
+ (cleanbuildplace): add check for INTERNAL_BUILD_UML
+
+ * pbuilder-checkparams (--internal-build-uml): new option.
+
Diffstat (limited to 'pbuilder-modules')
-rw-r--r-- | pbuilder-modules | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/pbuilder-modules b/pbuilder-modules index 30c49c7..4878e63 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -120,10 +120,12 @@ function cleanbuildplace () { if [ "$?" -ne 0 ]; then echo " -> Aborting with an error"; fi - if [ -d "$BUILDPLACE" ]; then - echo " -> cleaning the build env " - rm -rf "$BUILDPLACE" - fi; + if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then + if [ -d "$BUILDPLACE" ]; then + echo " -> cleaning the build env " + rm -rf "$BUILDPLACE" + fi; + fi } function umountproc_cleanbuildplace () { @@ -166,28 +168,30 @@ EOF function extractbuildplace () { # after calling this function, umountproc, and cleanbuildplace # needs to be called. Please trap it. - cleanbuildplace - echo "Building the build Environment" - echo " -> extracting base.tgz" - if ! mkdir -p "$BUILDPLACE"; then - echo "E: failed to build the directory to chroot" - exit 1 - fi - if [ ! -f "$BASETGZ" ]; then - echo "E: failed to find $BASETGZ, have you done <pbuilder create> to create your base tarball yet?" - exit 1 - fi - if ! (cd "$BUILDPLACE" && tar xfzp "$BASETGZ"); then - echo "E: failed to extract $BASETGZ to $BUILDPLACE" - exit 1 + if [ ! "${INTERNAL_BUILD_UML}" = "yes" ]; then + cleanbuildplace + echo "Building the build Environment" + echo " -> extracting base.tgz" + if ! mkdir -p "$BUILDPLACE"; then + echo "E: failed to build the directory to chroot" + exit 1 + fi + if [ ! -f "$BASETGZ" ]; then + echo "E: failed to find $BASETGZ, have you done <pbuilder create> to create your base tarball yet?" + exit 1 + fi + if ! (cd "$BUILDPLACE" && tar xfzp "$BASETGZ"); then + echo "E: failed to extract $BASETGZ to $BUILDPLACE" + exit 1 + fi + echo " -> copying/creating local configuration" + for a in hosts hostname resolv.conf; do + cp $( readlink -f /etc/$a ) "$BUILDPLACE/etc/$a"; + done fi mountproc - mkdir -p "$BUILDPLACE/tmp/buildd" - echo " -> copying/creating local configuration" - for a in hosts hostname resolv.conf; do - cp $( readlink -f /etc/$a ) "$BUILDPLACE/etc/$a"; - done hostname -f > "$BUILDPLACE/etc/mailname" + mkdir -p "$BUILDPLACE/tmp/buildd" if [ -n "$DISTRIBUTION" ]; then installaptlines |