diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index dd9dd43..fc9fa5c 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -16,7 +16,7 @@ REPO_NAME=${REPO_NAME:-SBo} REPO_BRANCH=${REPO_BRANCH:-13.1} KEEPLOG=YES LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log} -DEBUG=0 +DEBUG_UPDATES={$DEBUG_UPDATES:-0} CLEANUP=NO MKDIR_PROMPT=YES diff --git a/src/usr/man/man5/sbopkg.conf.5 b/src/usr/man/man5/sbopkg.conf.5 index 899a947..651a4ec 100644 --- a/src/usr/man/man5/sbopkg.conf.5 +++ b/src/usr/man/man5/sbopkg.conf.5 @@ -105,7 +105,7 @@ The default assignment is: \fCCLEANUP=NO\fP .\"--------------------------------------------------------------------- .TP -.B DEBUG +.B DEBUG_UPDATES Enumeration. .IP This option should be set to @@ -113,7 +113,7 @@ This option should be set to .BR 1 , or .BR 2 . -.B DEBUG +.B DEBUG_UPDATES sets the default debugging level for the update list feature of .BR sbopkg . When set to @@ -127,7 +127,7 @@ When set to .BR 2 , all non-updated packages are also listed. Changing -.B DEBUG +.B DEBUG_UPDATES to .B 1 or @@ -136,7 +136,7 @@ may be helpful if it appears the updatelist might be missing an update. .IP The default assignment is: .IP -\fCDEBUG=0\fP +\fCDEBUG_UPDATES={$DEBUG_UPDATES:-0}\fP .\"--------------------------------------------------------------------- .TP .B DIFF diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 1d328fb..3320ba6 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -104,8 +104,8 @@ config_check() { [[ -e $HOME/.sbopkg.conf ]] && . $HOME/.sbopkg.conf # Some configuration options are mandatory - for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME \ - REPO_BRANCH KEEPLOG CLEANUP LOGFILE DEBUG TMP OUTPUT RSYNCFLAGS \ + for VAR in REPO_ROOT QUEUEDIR SRCDIR SBOPKGTMP REPO_NAME REPO_BRANCH \ + KEEPLOG CLEANUP LOGFILE DEBUG_UPDATES TMP OUTPUT RSYNCFLAGS \ WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI; do if [[ -z "${!VAR}" ]]; then MISSING+="$VAR " @@ -129,8 +129,8 @@ Please correct this error and run $SCRIPT again. EOF exit 1 fi - if [[ $DEBUG -ne 0 && $DEBUG -ne 1 && $DEBUG -ne 2 ]]; then - echo "The \$DEBUG variable must be set to 0, 1, or 2." 1>&2 + if [[ $DEBUG_UPDATES != [012] ]]; then + echo "The DEBUG_UPDATES variable must be set to 0, 1, or 2." 1>&2 exit 1 fi @@ -813,7 +813,7 @@ check_for_updates() { >> $UPDATELIST echo "-$NAME" >> $SBOPKGTMP/sbopkg-update-queue else - if [[ $DEBUG -eq 2 ]]; then + if [[ $DEBUG_UPDATES -eq 2 ]]; then echo $NAME: >> $UPDATELIST echo " No update." >> $UPDATELIST fi @@ -823,7 +823,7 @@ check_for_updates() { "standard method, may be inaccurate." >> $UPDATELIST fi else - if [[ $DEBUG -ge 1 ]]; then + if [[ $DEBUG_UPDATES -ge 1 ]]; then echo $NAME: >> $UPDATELIST echo " Not in the repository." >> $UPDATELIST fi @@ -846,8 +846,9 @@ check_for_updates() { else cat $UPDATELIST fi - # Permanent log of the updatelist is saved when DEBUG is enabled. - if [[ $DEBUG -ge 1 ]]; then + # Permanent log of the updatelist is saved when DEBUG_UPDATES is + # enabled. + if [[ $DEBUG_UPDATES -ge 1 ]]; then cp $UPDATELIST $SBOPKGTMP/sbopkg-debug-updatelist else rm $UPDATELIST