aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-updatebuildenv
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2009-02-26 12:53:15 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2009-02-26 14:33:11 +0900
commit06a64a8ce3cbe0e9b7079114f821083ca3c3a8da (patch)
tree516660a2366b18b40d1a823ba1ec188a39a59634 /pbuilder-updatebuildenv
parent37597b2cb6439cce9571de83218586b0a99e6ea9 (diff)
downloadpbuilder-06a64a8ce3cbe0e9b7079114f821083ca3c3a8da.tar
pbuilder-06a64a8ce3cbe0e9b7079114f821083ca3c3a8da.tar.gz
refactor to use 'log' function rather than using 'echo' directly.
First cut into doing this, hopefully we're not breaking anything.
Diffstat (limited to 'pbuilder-updatebuildenv')
-rwxr-xr-xpbuilder-updatebuildenv10
1 files changed, 5 insertions, 5 deletions
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index 8b76da8..97eb466 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -23,7 +23,7 @@ set -e
if [ -n "$DISTRIBUTION" ] && [ "$OVERRIDE_APTLINES" = "yes" ]; then
- echo "Upgrading for distribution $DISTRIBUTION"
+ log "I: Upgrading for distribution $DISTRIBUTION"
fi
if [ "${PBUILDER_DEBUGMODE}" = "yes" ]; then
TRAP="echo ignoring trap "
@@ -35,8 +35,8 @@ extractbuildplace
$TRAP umountproc_cleanbuildplace_trap exit sighup
loadhooks
-echo "Refreshing the base.tgz "
-echo " -> upgrading packages"
+log "I: Refreshing the base.tgz "
+log "I: upgrading packages"
$CHROOTEXEC /usr/bin/apt-get update
if [ -n "$REMOVEPACKAGES" ]; then
$CHROOTEXEC /usr/bin/dpkg --purge $REMOVEPACKAGES
@@ -50,13 +50,13 @@ save_aptcache
# optionally auto-clean apt-cache
if [ "${AUTOCLEANAPTCACHE}" = "yes" -a -n "$APTCACHE" ]; then
- echo " -> Cleaning the cached apt archive"
+ log "I: Cleaning the cached apt archive"
$CHROOTEXEC /usr/bin/apt-get autoclean || true
find "$APTCACHE/" -maxdepth 1 -name \*.deb | \
while read A; do
if [ ! -f "$BUILDPLACE/var/cache/apt/archives/"$(basename "$A") -a \
-f "$A" ]; then
- echo " -> obsolete cache content "$(basename "$A")" removed"
+ log "I: obsolete cache content "$(basename "$A")" removed"
rm -f "$A" || true
fi
done