diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index 417f43a..0e2a542 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -2,6 +2,9 @@ Sat Jan 31 02:04:46 UTC 2009 Sbopkg 0.XX.X released. This version contains the following fixes and enhancements: - * + * Commit a patch that adds a new sbopkg.conf configuration variable, SQDIR, + where users can define where saved queues are stored; also, when the user + wants to load a saved queue, show a list of available saved queues; thanks + to slakmagik for the patch. +--------------------------+ diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index 05bd650..f4edc75 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -13,7 +13,7 @@ LOCALREPO=${LOCALREPO:-/home/sbo} SRCDIR=${SRCDIR:-/var/cache/sbopkg} export TMP=${TMP:-/tmp/SBo} export OUTPUT=${OUTPUT:-/tmp} -SQDIR=$TMP/queues +QUEUEDIR=$TMP/queues KEEPLOG=YES LOGFILE=$TMP/sbopkg-build-log DEBUG=0 diff --git a/src/usr/bin/sbopkg b/src/usr/bin/sbopkg index 54302f3..c380534 100755 --- a/src/usr/bin/sbopkg +++ b/src/usr/bin/sbopkg @@ -79,7 +79,7 @@ config_check () { KEEPLOG=$(echo "$KEEPLOG" | tr [[:lower:]] [[:upper:]]) # Some configuration options are mandatory - for VAR in RSYNCMIRROR SLACKVER LOCALREPO SRCDIR TMP OUTPUT SQDIR \ + for VAR in RSYNCMIRROR SLACKVER LOCALREPO SRCDIR TMP OUTPUT QUEUEDIR \ KEEPLOG LOGFILE DEBUG RSYNCFLAGS WGETFLAGS; do if [ -z "${!VAR}" ]; then MISSING+="$VAR " @@ -163,8 +163,8 @@ directory_checks () { "Creating local TMP directory $TMP." ck_dir "$OUTPUT" \ "Creating local package output directory $OUTPUT." - ck_dir "$SQDIR" \ - "Creating queues directory $SQDIR." + ck_dir "$QUEUEDIR" \ + "Creating queues directory $QUEUEDIR." ck_dir "$LOGDIR" \ "Creating log directory $LOGDIR." @@ -1079,15 +1079,15 @@ load_user_queue () { local QFS=$TMP/sbopkg-queue-files-selection local QFM=$TMP/sbopkg-queue-files-menu - if [ -z "$(ls -A $SQDIR 2>/dev/null)" ]; then + if [ -z "$(ls -A $QUEUEDIR 2>/dev/null)" ]; then if [ "$DIAG" = 1 ]; then dialog --title "ERROR" --msgbox "$(crunch "The queue directory \ - $SQDIR is empty.")" 8 30 + $QUEUEDIR is empty.")" 8 30 continue fi fi while :; do - find $SQDIR -type f -printf "\"%P\" \"\"\n" | sort > $QFM + find $QUEUEDIR -type f -printf "\"%P\" \"\"\n" | sort > $QFM dialog --cancel-label "Cancel" --title "$TITLE" \ --default-item "${USERQUEUE##*/}" --menu \ "$(crunch "Please choose the queue you would like to load and \ @@ -1096,7 +1096,7 @@ load_user_queue () { if [ $? != 0 ]; then break fi - USERQUEUE=$SQDIR/$(cat $QFS) + USERQUEUE=$QUEUEDIR/$(cat $QFS) if [ -e $USERQUEUE ]; then touch $TMP/sbopkg_user_queue.lck # Reading from $USERQUEUE... @@ -1130,7 +1130,7 @@ save_user_queue () { if [ "$(cat $TMP/sbopkg-user-queue)" = "" ]; then return 0 fi - USERQUEUE="$SQDIR/$(cat $TMP/sbopkg-user-queue)" + USERQUEUE="$QUEUEDIR/$(cat $TMP/sbopkg-user-queue)" if [ ! "$USERQUEUE" = "" ]; then if [ -e $USERQUEUE ]; then dialog --title "Error" --yesno "$(crunch "Another file \ diff --git a/src/usr/man/man5/sbopkg.conf.5 b/src/usr/man/man5/sbopkg.conf.5 index 8ca9087..243e678 100644 --- a/src/usr/man/man5/sbopkg.conf.5 +++ b/src/usr/man/man5/sbopkg.conf.5 @@ -90,14 +90,14 @@ The default value of OUTPUT is: export OUTPUT=${OUTPUT:-/tmp}. .TP 5 -.B SQDIR +.B QUEUEDIR .br This option defines the directory under which saved queue files will be kept. -The default value of SQDIR is: +The default value of QUEUEDIR is: .br -SQDIR=$TMP/queues +QUEUEDIR=$TMP/queues .TP 5 .B KEEPLOG