From fd99d8e952d16925a9fcb1011a44570d6f8450d1 Mon Sep 17 00:00:00 2001 From: slakmagik Date: Wed, 3 Feb 2010 05:10:33 +0000 Subject: [PATCH] Address issue 33 (sbopkg sometimes picks older pkg to install; not latest) Change a 'head' to a 'tail' so that info_item() is less likely to pick an older package to present for installation. --- ChangeLog-current.txt | 2 ++ src/usr/sbin/sbopkg | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index b4f74c5..8566d3b 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -14,4 +14,6 @@ enhancements: is useful, for example, if you have some SBo/sbopkg directories on a temporary filesystem and don't want to be bothered with repeated directory creation prompts. Thanks to agikhan for the report. + * Address an issue where sbopkg could sometimes pick an older package to + present for installation rather than the most recent one. +--------------------------+ diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index e40aa00..38d7627 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -1147,7 +1147,7 @@ info_item() { if [[ -z $CURPACKAGE ]]; then unset MENUPACKAGE else - CURPACKAGE=$(head -n 1 <<< "$CURPACKAGE") + CURPACKAGE=$(tail -n 1 <<< "$CURPACKAGE") MENUPACKAGE="Install $CURPACKAGE" fi if [[ -z $INSTALLEDPACKAGE ]]; then