[pbuilder] 01/01: modules: usa default value of I if LOGLEVEL is undefined

Mattia Rizzolo mattia at debian.org
Sat Jan 7 15:09:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pbuilder.

commit 8dd5b5545638045c632f9d26198b3f0a6bdb00ba
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Jan 7 16:07:03 2017 +0100

    modules: usa default value of I if LOGLEVEL is undefined
    
    This way external scripts (like pbuilder-satisfydepends-apt is) can use
    the log.*() functions without setting LOGLEVEL (which would imply
    parsing pbuilderrc and the comman flag) and have a chance of actually
    print something.
    
    Note that by choice the default value is used only in case of unset
    variable, and not also in case of empty value.
    
    Gbp-Dch: Short
---
 pbuilder-modules | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pbuilder-modules b/pbuilder-modules
index 4d5f942..98171ef 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -140,22 +140,22 @@ function log() {
 }
 
 log.e() {
-    case "$LOGLEVEL" in
+    case "${LOGLEVEL-I}" in
         D|I|W|E) log "E: $*" ;;
     esac
 }
 log.w() {
-    case "$LOGLEVEL" in
+    case "${LOGLEVEL-I}" in
         D|I|W) log "W: $*" ;;
     esac
 }
 log.i() {
-    case "$LOGLEVEL" in
+    case "${LOGLEVEL-I}" in
         D|I) log "I: $*" ;;
     esac
 }
 log.d() {
-    case "$LOGLEVEL" in
+    case "${LOGLEVEL-I}" in
         D) log "D: $*" ;;
     esac
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list