From b132e73ccd34db691d9ca9b1ec58bc7776195fa7 Mon Sep 17 00:00:00 2001 From: "chess.griffin" Date: Wed, 9 Sep 2009 13:38:59 +0000 Subject: [PATCH] add :force to sbopkg.conf WGETFLAGS after --progress=bar to correctly display the progress bar; thanks to happyslacker for the reminder. --- ChangeLog-current.txt | 3 +++ src/etc/sbopkg/sbopkg.conf.new | 2 +- src/usr/sbin/sbopkg | 28 ++++------------------------ 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index 6a26050..9d521f9 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -4,4 +4,7 @@ enhancements: * Fix typo in 50-default renames file. * Add $ARCH information in dialog backtitles. + * Add ":force" to sbopkg.conf WGETFLAGS --progress=bar to correctly + display the wget progress bar; thanks to happyslacker for nudging me on + this issue again. +--------------------------+ diff --git a/src/etc/sbopkg/sbopkg.conf.new b/src/etc/sbopkg/sbopkg.conf.new index 7999cd8..39bcaec 100644 --- a/src/etc/sbopkg/sbopkg.conf.new +++ b/src/etc/sbopkg/sbopkg.conf.new @@ -32,6 +32,6 @@ export OUTPUT=${OUTPUT:-/tmp} # uses the -O options so there is no need to add that either. In general, # it is not recommended that users change these default values. RSYNCFLAGS="--verbose --timeout=10" -WGETFLAGS="--continue --progress=bar --timeout=15 --tries=5" +WGETFLAGS="--continue --progress=bar:force --timeout=15 --tries=5" DIFF=${DIFF:-diff} DIFFOPTS=${DIFFOPTS:--u} diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 5016f19..ccab2f3 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -645,18 +645,8 @@ check_for_updates() { # Extract the new package version if [[ ! -z $NEWSB ]]; then - NEWARCH=$(egrep -m1 "^ARCH" $NEWSB | sed ' - s/\([^\t #]*\)[\t #].*/\1/ - s/[^=]*=// - s/"//g - s/\${[^-]*-\(.*\)}/\1/ - s/\$.*/unknown/ - ') - NEWBUILD=$(egrep -m1 "^BUILD" $NEWSB | sed ' - s/^.*[=-]// - s/"//g - s/[ #}\t].*$//g - ') + eval $(echo -n NEW; grep -m1 ^ARCH= $NEWSB) + eval $(echo -n NEW; grep -m1 ^BUILD= $NEWSB) # Step 1 - find the version expression # This looks for the last instance of $OUTPUT. @@ -1058,18 +1048,8 @@ info_item() { SHORTPATH=$REPO_DIR/$CATEGORY/$APP CURVERSION=$(grep VERSION $SHORTPATH/$APP.info | cut -d= -f2 | sed s/\"//g) - CURARCH=$(egrep -m1 "^ARCH" $SHORTPATH/$APP.SlackBuild | sed ' - s/\([^\t #]*\)[\t #].*/\1/ - s/[^=]*=// - s/"//g - s/\${[^-]*-\(.*\)}/\1/ - s/\$.*/unknown/ - ') - CURBUILD=$(egrep -m1 "^BUILD" $SHORTPATH/$APP.SlackBuild | sed ' - s/^.*[=-]// - s/"//g - s/[ #}\t].*$//g - ') + eval $(echo -n CUR; grep -m1 ^ARCH= $SHORTPATH/$APP.SlackBuild) + eval $(echo -n CUR; grep -m1 ^BUILD= $SHORTPATH/$APP.SlackBuild) while :; do INSTALLEDPACKAGE=$(ls /var/log/packages | egrep "^($APP|$OLDPKG)-[^-]*-[^-]*-[^-]*\$")