From 35ec60f02489c9f81ac9ae37b3930353c2c37820 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 21 May 2011 19:30:37 +0200 Subject: Suppress cowbuilder/pbuilder cache (use approx instead. --- localcowbuilder-create | 5 ++--- localcowbuilder-login | 2 +- localcowbuilder-update | 3 +-- localcowdebuild | 2 +- localpbuilder-create | 5 ++--- localpbuilder-login | 2 +- localpbuilder-update | 9 ++++++--- localpdebuild | 13 +++++++++---- 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/localcowbuilder-create b/localcowbuilder-create index b4b6c8b..8edf579 100755 --- a/localcowbuilder-create +++ b/localcowbuilder-create @@ -97,11 +97,11 @@ if [ -z "$distro" ]; then fi basepath="/var/cache/pbuilder/cow-$pool" -aptcache="/var/cache/pbuilder/aptcache-$pool/" +aptcache="" buildresult="$HOME/src/pbuild-$pool/" makepaths='' -for path in "$aptcache" "$buildresult"; do +for path in "$buildresult"; do if [ ! -d "$path" ]; then echo "W: Needed path \"$path\" does not exist" makepaths='yes' @@ -112,7 +112,6 @@ if [ "$makepaths" = 'yes' ]; then || ask 'Create the missing path(s)' \ || exit1 "Cannot continue without those missing paths" mkdir -p "$buildresult" - sudo mkdir -p "$aptcache" fi if [ -d "$basepath" ]; then diff --git a/localcowbuilder-login b/localcowbuilder-login index c3f9289..dbd869f 100755 --- a/localcowbuilder-login +++ b/localcowbuilder-login @@ -42,7 +42,7 @@ shift basepath="/var/cache/pbuilder/cow-$pool" buildplace="/var/cache/pbuilder/build-$pool" -aptcache="/var/cache/pbuilder/aptcache-$pool/" +aptcache="" sudo cowbuilder --login \ --basepath "$basepath" \ diff --git a/localcowbuilder-update b/localcowbuilder-update index 18507ea..5e2ae22 100755 --- a/localcowbuilder-update +++ b/localcowbuilder-update @@ -42,11 +42,10 @@ export LANG=C for pool in $@; do basepath="/var/cache/pbuilder/cow-$pool" - aptcache="/var/cache/pbuilder/aptcache-$pool/" + aptcache="" # sudo cowbuilder --update \ # --basepath "$basepath" \ # --aptcache "$aptcache" - sudo find "$aptcache" -type f -exec cp -a '{}' "$basepath/var/cache/apt/archives/" ';' sudo chroot "$basepath" apt-get -y --force-yes update sudo chroot "$basepath" apt-get -y --force-yes upgrade sudo chroot "$basepath" apt-get -y --force-yes clean diff --git a/localcowdebuild b/localcowdebuild index c1eaab8..14cb2cc 100755 --- a/localcowdebuild +++ b/localcowdebuild @@ -69,7 +69,7 @@ done for pool in $pools; do basepath="/var/cache/pbuilder/cow-$pool" buildplace="/var/cache/pbuilder/build-$pool" - aptcache="/var/cache/pbuilder/aptcache-$pool/" + aptcache="" hookdir="/var/cache/pbuilder/hooks-$pool/" buildresult="$HOME/src/pbuild-$pool/" pdebuild \ diff --git a/localpbuilder-create b/localpbuilder-create index 5287f52..55a24cd 100755 --- a/localpbuilder-create +++ b/localpbuilder-create @@ -98,11 +98,11 @@ fi basetgz="/var/cache/pbuilder/base-$pool.tgz" buildplace="/var/cache/pbuilder/build-$pool/" -aptcache="/var/cache/pbuilder/aptcache-$pool/" +aptcache="" buildresult="$HOME/src/pbuild-$pool/" makepaths='' -for path in "$aptcache" "$buildresult"; do +for path in "$buildresult"; do if [ ! -d "$path" ]; then echo "W: Needed path \"$path\" does not exist" makepaths='yes' @@ -113,7 +113,6 @@ if [ "$makepaths" = 'yes' ]; then || ask 'Create the missing path(s)' \ || exit1 "Cannot continue without those missing paths" mkdir -p "$buildresult" - sudo mkdir -p "$aptcache" fi sudo pbuilder create \ diff --git a/localpbuilder-login b/localpbuilder-login index 7ef0499..dbef62b 100755 --- a/localpbuilder-login +++ b/localpbuilder-login @@ -42,7 +42,7 @@ shift basetgz="/var/cache/pbuilder/base-$pool.tgz" buildplace="/var/cache/pbuilder/build-$pool/" -aptcache="/var/cache/pbuilder/aptcache-$pool/" +aptcache="" sudo pbuilder --login \ --basetgz "$basetgz" \ diff --git a/localpbuilder-update b/localpbuilder-update index f00b6e3..abc5ff5 100755 --- a/localpbuilder-update +++ b/localpbuilder-update @@ -38,8 +38,11 @@ if [ $# -eq 0 ]; then fi for pool in $@; do + basetgz="/var/cache/pbuilder/base-$pool.tgz" + buildplace="/var/cache/pbuilder/build-$pool/" + aptcache="" sudo pbuilder update \ - --basetgz /var/cache/pbuilder/base-$pool.tgz \ - --buildplace /var/cache/pbuilder/build-$pool/ \ - --aptcache /var/cache/pbuilder/aptcache-$pool/ + --basetgz "$basetgz" \ + --buildplace "$buildplace" \ + --aptcache "$aptcache" done diff --git a/localpdebuild b/localpdebuild index 5ad993a..be22c3e 100755 --- a/localpdebuild +++ b/localpdebuild @@ -67,14 +67,19 @@ while [ $# -gt 0 ]; do done for pool in $pools; do + basetgz="/var/cache/pbuilder/base-$pool.tgz" + buildplace="/var/cache/pbuilder/build-$pool" + aptcache="" + hookdir="/var/cache/pbuilder/hooks-$pool/" + buildresult="$HOME/src/pbuild-$pool/" pdebuild \ - --buildresult $HOME/src/pbuild-$pool/ \ + --buildresult "$buildresult" \ ${debbuildopts:+--debbuildopts "$debbuildopts"} \ $pdebuildopts \ -- \ - --basetgz /var/cache/pbuilder/base-$pool.tgz \ - --buildplace /var/cache/pbuilder/build-$pool/ \ - --aptcache /var/cache/pbuilder/aptcache-$pool/ \ + --basetgz "$basetgz" \ + --buildplace "$buildplace" \ + --aptcache "$aptcache" \ --pkgname-logfile \ $@ done -- cgit v1.2.3