merge in two patches from slakmagik that allow the user to maintain (and retain between rsyncs) an optional /local/ directory in the local SBo repo tree where the user could have other SlackBuilds created and maintained locally in the SBo style; also, second patch introduces LOGFILE sbopkg.conf variable, which allows the user to set the name and location of the permanent build log; thanks to slakmagik for these two very nice additions.

This commit is contained in:
chess.griffin 2009-01-21 00:55:00 +00:00
parent da2fa378f7
commit 59ef49e159
3 changed files with 21 additions and 10 deletions

View File

@ -10,5 +10,14 @@ enhancements:
they want to replace items already in the queue or skip them.
* Merge in a large whitespace/cleanup patch by slakmagik which greatly
improves the readability of the code.
* Replace the 'Clear Queue' menu item with 'Delete Queue Items' which
provides the user the to delete individual items in the queue or clear the
entire build queue.
* Add in two patches from slakmagik, the first allows the user to have a
/local/ directory in the local SBo repository where the user can maintain
individual non-SBo SlackBuilds (in the SBo style, however) which will be
picked up by sbopkg, the second adds a new sbopkg.conf variable LOGFILE
where the user can decide the name and location of the permanent build
log, if used.
+--------------------------+

View File

@ -14,6 +14,7 @@ SRCDIR=${SRCDIR:-/var/cache/sbopkg}
export TMP=${TMP:-/tmp/SBo}
export OUTPUT=${OUTPUT:-/tmp}
KEEPLOG=YES
LOGFILE=$TMP/sbopkg-build-log
DEBUG=0
# The following variables are required and can be tweaked if desired,

View File

@ -69,7 +69,7 @@ config_check () {
else
. $SBOPKG_CONF
for VAR in RSYNCMIRROR SLACKVER LOCALREPO SRCDIR TMP OUTPUT KEEPLOG \
DEBUG RSYNCFLAGS WGETFLAGS; do
LOGFILE DEBUG RSYNCFLAGS WGETFLAGS; do
if [ -z "${!VAR}" ]; then
MISSING+="$VAR "
fi
@ -882,7 +882,7 @@ info_item () {
install_package $IPACKAGE | tee $SBOPKGINSTALLOUTPUT
read -n 1 -p "Press any key to continue."
if [ "$KEEPLOG" = "YES" ]; then
cat $SBOPKGINSTALLOUTPUT >> $TMP/sbopkg-build-log
cat $SBOPKGINSTALLOUTPUT >> $LOGFILE
fi
rm -f $SBOPKGINSTALLOUTPUT
fi
@ -1006,17 +1006,17 @@ view_cache_dir () {
view_perm_log () {
# This function displays the contents of the permanent build log,
# which is kept if KEEPLOG is set to YES in the config file.
if [ ! -e $TMP/sbopkg-build-log ]; then
if [ ! -e $LOGFILE ]; then
dialog --title "ERROR" --msgbox "$(crunch "No permanent log \
found. Please make sure KEEPLOG is set to YES \
in the configuration file.")" 10 30
continue
else
dialog --title "Displaying $TMP/sbopkg-build-log" \
--textbox $TMP/sbopkg-build-log 0 0
dialog --title "Displaying $LOGFILE" \
--textbox $LOGFILE 0 0
dialog --title "Keep Log?" --yes-label "Keep" --no-label "Delete" \
--yesno "$(crunch "Would you like to keep the permanent build \
log $TMP/sbopkg-build-log?")" 6 50
log $LOGFILE?")" 6 50
if [ $? = 1 ]; then
check_root
if [ $ROOT = "false" ]; then
@ -1024,7 +1024,7 @@ view_perm_log () {
"Sorry, only the root user can delete the build log." 8 30
continue
else
rm -f $TMP/sbopkg-build-log
rm -f $LOGFILE
dialog --title "Done" --msgbox \
"The build log has been deleted." 8 30
continue
@ -1367,7 +1367,8 @@ rsync_command () {
# We do not use -z as this causes heavy CPU load on the server
# and has very limited effect when most of the pull is .gz files.
/usr/bin/rsync --archive --delete --no-owner --exclude="*.sbopkg" \
$RSYNCFLAGS $RSYNCMIRROR/$SLACKVER/ $LOCALREPO/$SLACKVER/
--exclude="/local/" $RSYNCFLAGS \
$RSYNCMIRROR/$SLACKVER/ $LOCALREPO/$SLACKVER/
RSYNC_RETVAL=$?
rm -f $TMP/sbopkg_rsync.lck
if [ ! $RSYNC_RETVAL = 0 ]; then
@ -2175,8 +2176,8 @@ process_queue () {
fi
fi
if [ "$KEEPLOG" = "YES" ]; then
cat $SBOPKGOUTPUT >> $TMP/sbopkg-build-log
cat $SUMMARYLOG >> $TMP/sbopkg-build-log
cat $SBOPKGOUTPUT >> $LOGFILE
cat $SUMMARYLOG >> $LOGFILE
fi
BUILDPKGS=""
INSTALLPKGS=""