From 06a64a8ce3cbe0e9b7079114f821083ca3c3a8da Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Thu, 26 Feb 2009 12:53:15 +0900 Subject: refactor to use 'log' function rather than using 'echo' directly. First cut into doing this, hopefully we're not breaking anything. --- pbuilder-updatebuildenv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pbuilder-updatebuildenv') 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 -- cgit v1.2.3