diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-13 11:24:13 +0000 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-11-15 10:16:22 +0000 |
commit | fcee0334be27ea4ec4a5fdc3f940e015e60defe9 (patch) | |
tree | a015c6e7e52e38c868a60c1b5397610a0f6e1cbd /pbuilder-modules | |
parent | 580b246ae589e4b6011f6149e4680b1fa08497f4 (diff) | |
download | pbuilder-fcee0334be27ea4ec4a5fdc3f940e015e60defe9.tar pbuilder-fcee0334be27ea4ec4a5fdc3f940e015e60defe9.tar.gz |
use log.w() instead of log()
Diffstat (limited to 'pbuilder-modules')
-rw-r--r-- | pbuilder-modules | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/pbuilder-modules b/pbuilder-modules index 8bcfb1f..43e147d 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -141,25 +141,25 @@ function seems_truly_unmounted() { local mountpoint mountpoint="$1" if ! [ -e "$BUILDPLACE/$mountpoint" ]; then - log "W: $mountpoint doesn't exist" + log.w "$mountpoint doesn't exist" return 1 fi if ! [ -d "$BUILDPLACE/$mountpoint" ]; then - log "W: $mountpoint isn't a directory" + log.w "$mountpoint isn't a directory" return 1 fi if [ -r "$BUILDPLACE/proc/mounts" ] && \ grep -q "^[^ ]* $mountpoint " "$BUILDPLACE/proc/mounts"; then - log "W: $mountpoint is mounted according to build place's /proc/mounts" + log.w "$mountpoint is mounted according to build place's /proc/mounts" return 1 fi if [ -r "/proc/mounts" ] && \ grep -q "^[^ ]* $BUILDPLACE/$mountpoint " "/proc/mounts"; then - log "W: $mountpoint is mounted according to system's /proc/mounts" + log.w "$mountpoint is mounted according to system's /proc/mounts" return 1 fi if ! is_empty_dir "$BUILDPLACE/$mountpoint"; then - log "W: $mountpoint not empty" + log.w "$mountpoint not empty" return 1 fi return 0 @@ -175,7 +175,7 @@ function umount_one () { log.i "unmounting $1 filesystem" local UMOUNT_OUTPUT if ! UMOUNT_OUTPUT="$(LC_ALL=C umount "$BUILDPLACE/$1" 2>&1)"; then - log "W: Could not unmount $1: $UMOUNT_OUTPUT" + log.w "Could not unmount $1: $UMOUNT_OUTPUT" local ignore_umount_error="no" case $UMOUNT_OUTPUT in "umount: "*": not found"|"umount:"*": not mounted") @@ -183,7 +183,7 @@ function umount_one () { if seems_truly_unmounted "$1"; then ignore_umount_error="yes" else - log "W: Tried ignoring error in unmount, but sanity check failed: $1 might still be mounted" + log.w "Tried ignoring error in unmount, but sanity check failed: $1 might still be mounted" fi ;; *) @@ -191,7 +191,7 @@ function umount_one () { ;; esac if [ "$ignore_umount_error" != "yes" ]; then - log "W: Retrying to unmount $1 in 5s" + log.w "Retrying to unmount $1 in 5s" sleep 5s while ! umount "$BUILDPLACE/$1"; do sleep 5s @@ -210,7 +210,7 @@ EOF chroot "$BUILDPLACE" bin/sh done else - log "W: Ignored error in unmount" + log.w "Ignored error in unmount" fi fi } @@ -371,7 +371,7 @@ function clean_subdirectories () { exit 1; fi if [ ! -d "$1" ]; then - log "W: directory $1 does not exist in clean_subdirectories" + log.w "directory $1 does not exist in clean_subdirectories" return; fi log.i "removing directory $1 and its subdirectories" @@ -382,7 +382,7 @@ function clean_subdirectories () { function cleanbuildplace () { if [ "$?" -ne 0 ]; then - log "W: Aborting with an error"; + log.w "Aborting with an error"; fi unloadhooks if [ "${INTERNAL_BUILD_UML}" != "yes" ]; then @@ -410,7 +410,7 @@ function cleanbuildplace () { function umountproc_cleanbuildplace () { # rolling back to abort. if [ "$?" -ne 0 ]; then - log "W: Aborting with an error"; + log.w "Aborting with an error"; fi umountproc cleanbuildplace @@ -478,7 +478,7 @@ function copy_local_configuration () { rm -f "$BUILDPLACE/etc/$a" cp "$( readlink -f "/etc/$a" )" "$BUILDPLACE/etc/$a" else - log "W: No local /etc/$a to copy, relying on $BUILDPLACE/etc/$a to be correct" + log.w "No local /etc/$a to copy, relying on $BUILDPLACE/etc/$a to be correct" fi done } @@ -512,7 +512,7 @@ function extractbuildplace () { installaptlines else # Warn if override config is not set if [ "$OVERRIDE_APTLINES_WARN" = "yes" ]; then - log "W: --override-config is not set; not updating apt.conf Read the manpage for details." + log.w "--override-config is not set; not updating apt.conf Read the manpage for details." fi fi @@ -535,12 +535,12 @@ function extractbuildplace () { rmdir "$BUILDPLACE/tmp/buildd" ln -rs "${BUILDPLACE}$BUILDDIR" "$BUILDPLACE/tmp/buildd" else - log "W: Could not create compatibility symlink because /tmp/buildd is not empty" + log.w "Could not create compatibility symlink because /tmp/buildd is not empty" fi elif [ ! -e "$BUILDPLACE/tmp/buildd" ]; then ln -rs "${BUILDPLACE}$BUILDDIR" "$BUILDPLACE/tmp/buildd" else - log "W: Could not create compatibility symlink because /tmp/buildd exists and it is not a directory" + log.w "Could not create compatibility symlink because /tmp/buildd exists and it is not a directory" fi fi executehooks "H" |