aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-11-13 11:24:13 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-11-15 10:16:22 +0000
commitfcee0334be27ea4ec4a5fdc3f940e015e60defe9 (patch)
treea015c6e7e52e38c868a60c1b5397610a0f6e1cbd
parent580b246ae589e4b6011f6149e4680b1fa08497f4 (diff)
downloadpbuilder-fcee0334be27ea4ec4a5fdc3f940e015e60defe9.tar
pbuilder-fcee0334be27ea4ec4a5fdc3f940e015e60defe9.tar.gz
use log.w() instead of log()
-rwxr-xr-xpbuilder-buildpackage4
-rwxr-xr-xpbuilder-checkparams2
-rw-r--r--pbuilder-modules32
-rw-r--r--pbuilder-runhooks14
-rwxr-xr-xpbuilder-updatebuildenv4
-rw-r--r--pdebuild2
-rw-r--r--pdebuild-checkparams2
7 files changed, 30 insertions, 30 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index b5468b5..8504b10 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -52,7 +52,7 @@ case $USENETWORK in
yes)
if [ "$DEB_BUILD_ARCH_OS" = "linux" ]; then
# omit the warning when running on kFreeBSD or Hurd
- log "W: pbuilder: network will not be disabled during build!"
+ log.w "pbuilder: network will not be disabled during build!"
fi
;;
*)
@@ -63,7 +63,7 @@ case $USENETWORK in
else
USENETWORK=yes
if [ "$DEB_BUILD_ARCH_OS" = "linux" ]; then
- log "W: pbuilder: unshare CLONE_NEWNET not available"
+ log.w "pbuilder: unshare CLONE_NEWNET not available"
fi
log.i "pbuilder: network access is available during build!"
fi
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index e41c8ae..81878a6 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -97,7 +97,7 @@ while [ -n "$1" ]; do
BUILDRESULT=$(readlink -f "$2");
else
BUILDRESULT="$2"
- log "W: Build-result Directory $2 does not exist"
+ log.w "Build-result Directory $2 does not exist"
# warn, but make it progress.
fi
else
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"
diff --git a/pbuilder-runhooks b/pbuilder-runhooks
index 6e912b0..8e96e95 100644
--- a/pbuilder-runhooks
+++ b/pbuilder-runhooks
@@ -38,10 +38,10 @@ function loadhooks () {
if [ -d "$HOOKDIR" ]; then
mkdir -p "$BUILDPLACE/$hooks"
if ! cp -aL "$HOOKDIR/"* "$BUILDPLACE/$hooks"; then
- log "W: no hooks found in the hookdir '$HOOKDIR'"
+ log.w "no hooks found in the hookdir '$HOOKDIR'"
fi
else
- log "W: hookdir $HOOKDIR does not exist, skipping"
+ log.w "hookdir $HOOKDIR does not exist, skipping"
fi
}
@@ -75,13 +75,13 @@ function executehooks () {
for fn in "$BUILDPLACE/$hooks/$prefix"[0-9][0-9]* ; do
case "$fn" in
"$BUILDPLACE/$hooks/$prefix"'[0-9][0-9]*')
- log "W: no hooks of type ${prefix} found -- ignoring"
+ log.w "no hooks of type ${prefix} found -- ignoring"
;;
*~)
- log "W: skipping an editor backup file $fn"
+ log.w "skipping an editor backup file $fn"
;;
*.bak)
- log "W: skipping a backup file $fn"
+ log.w "skipping a backup file $fn"
;;
*)
if [ -x "$fn" ]; then
@@ -92,10 +92,10 @@ function executehooks () {
else
if [ -f "$fn" ]; then
filetype=$(basename "$fn" )
- log "W: execute priv not set on file $filetype, not executing."
+ log.w "execute priv not set on file $filetype, not executing."
else
# Should it reach here ? This case should be caught in the above case.
- log "W: no hooks of type ${prefix} found -- internal error in logic"
+ log.w "no hooks of type ${prefix} found -- internal error in logic"
fi
fi
;;
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index d370f8f..d91ce88 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -78,10 +78,10 @@ if [ "$DEBDELTA" = "yes" ]; then
if $CHROOTEXEC debdelta-upgrade ; then
:
else
- log "W: debdelta failed, continue and use plain apt to update the system"
+ log.w "debdelta failed, continue and use plain apt to update the system"
fi
else
- log "W: debdelta is enabled but not (yet) installed, not using it"
+ log.w "debdelta is enabled but not (yet) installed, not using it"
fi
fi
diff --git a/pdebuild b/pdebuild
index af7b365..c589de2 100644
--- a/pdebuild
+++ b/pdebuild
@@ -74,7 +74,7 @@ if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
fi
else
if ! dpkg-checkbuilddeps -B ; then
- log "W: Unmet build-dependency in source"
+ log.w "Unmet build-dependency in source"
fi
echo "dpkg-buildpackage -S -d -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | \
perl -pe 's/(^|\s)['\'']?-[AbBFgG]['\'']?(\s|$)/$1$2/g' | \
diff --git a/pdebuild-checkparams b/pdebuild-checkparams
index 0bcfc67..885ed7a 100644
--- a/pdebuild-checkparams
+++ b/pdebuild-checkparams
@@ -33,7 +33,7 @@ while [ -n "$1" ]; do
BUILDRESULT=$(readlink -f "$2");
else
BUILDRESULT="$2"
- log "W: Build-result Directory $2 does not exist"
+ log.w "Build-result Directory $2 does not exist"
# warn, but make it progress.
fi
else