diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-09-22 20:02:09 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-09-22 20:02:09 +0200 |
commit | a8fb4b957d1c37ace38162572b35b36f588572b1 (patch) | |
tree | 99ebb58d6bad9a7a3863666825d82e254087bc56 | |
parent | 049a78fc635815773c96b8509cc2515a84fbcefb (diff) | |
download | jenkins.debian.net-a8fb4b957d1c37ace38162572b35b36f588572b1.tar.xz |
reproducible: add comments and refactor
-rwxr-xr-x | bin/reproducible_setup_pbuilder.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh index 02e198d1..b4e93027 100755 --- a/bin/reproducible_setup_pbuilder.sh +++ b/bin/reproducible_setup_pbuilder.sh @@ -79,8 +79,8 @@ setup_pbuilder() { shift NAME=$1 shift - PACKAGES="$@" - EXTRA_PACKAGES="locales-all fakeroot disorderfs" + PACKAGES="$@" # from our repo + EXTRA_PACKAGES="locales-all fakeroot disorderfs" # from sid echo "$(date) - creating /var/cache/pbuilder/${NAME}.tgz now..." TMPFILE=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXXX) LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX) @@ -94,12 +94,15 @@ setup_pbuilder() { echo "echo '$(cat /etc/apt/apt.conf.d/80proxy)' > /etc/apt/apt.conf.d/80proxy" >> ${TMPFILE} pbuilder_http_proxy="--http-proxy $http_proxy" fi - create_setup_tmpfile ${TMPFILE} "${PACKAGES}" + # setup base.tgz sudo pbuilder --create $pbuilder_http_proxy --basetgz /var/cache/pbuilder/${NAME}-new.tgz --distribution $SUITE --extrapackages "$EXTRA_PACKAGES" + # apply further customisations, eg. install $PACKAGES from our repo + create_setup_tmpfile ${TMPFILE} "${PACKAGES}" if [ "$DEBUG" = "true" ] ; then cat "$TMPFILE" fi sudo pbuilder --execute $pbuilder_http_proxy --save-after-exec --basetgz /var/cache/pbuilder/${NAME}-new.tgz -- ${TMPFILE} | tee ${LOG} + # finally, confirm things are as they should be echo echo "Now let's see whether the correct packages where installed..." for PKG in ${PACKAGES} ; do |