fix cosmetic bug where ARCH and BUILD were not displaying correctly in the updates list; thanks to Mauro and slakmagik for the actual working code for this fix

This commit is contained in:
chess.griffin 2009-10-08 14:45:27 +00:00
parent 81e337a664
commit 9c775aa684
2 changed files with 9 additions and 25 deletions

View file

@ -1,4 +1,4 @@
Sun Sep 6 04:10:58 UTC 2009
Thu Oct 8 14:44:23 UTC 2009
Sbopkg 0.XX.X released. This version contains the following fixes and
enhancements:
@ -26,4 +26,6 @@ enhancements:
* Modify sspm to be root-only and change the default checkout location. In
case it isn't obvious, this means the checkout will be root-owned if it
isn't already.
* Fix cosmetic bug where ARCH and BUILD were not displaying correctly in
list of updates on x86_64.
+--------------------------+

View file

@ -698,18 +698,9 @@ 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 NEW$(grep -m1 ^ARCH= $NEWSB)
eval NEW$(grep -m1 ^BUILD= $NEWSB)
[[ -z $NEWARCH ]] && NEWARCH=unknown
# Step 1 - find the version expression
# This looks for the last instance of $OUTPUT.
@ -1111,18 +1102,9 @@ 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 CUR$(grep -m1 ^ARCH= $SHORTPATH/$APP.SlackBuild)
eval CUR$(grep -m1 ^BUILD= $SHORTPATH/$APP.SlackBuild)
[[ -z $CURARCH ]] && CURARCH=unknown
while :; do
INSTALLEDPACKAGE=$(ls /var/log/packages |
egrep "^($APP|$OLDPKG)-[^-]*-[^-]*-[^-]*\$")