diff options
author | Eric Hameleers <alien@slackware.com> | 2013-03-30 14:57:49 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2013-03-30 14:57:49 +0000 |
commit | bd88933675f9b0d95b5efc840764be113588e09f (patch) | |
tree | f4f619aac7c031ddf8f431b9c024baf5b25d162d /compat32-tools | |
parent | f5a15f62a9dee9955e00f4111994a30b0cb8bbf0 (diff) | |
download | multilib-bd88933675f9b0d95b5efc840764be113588e09f.tar.gz multilib-bd88933675f9b0d95b5efc840764be113588e09f.tar.xz |
Check for package BUILD to determine if we need to refresh a compat32 package.
Diffstat (limited to 'compat32-tools')
-rwxr-xr-x | compat32-tools/massconvert32.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compat32-tools/massconvert32.sh b/compat32-tools/massconvert32.sh index 0d81832..5563002 100755 --- a/compat32-tools/massconvert32.sh +++ b/compat32-tools/massconvert32.sh @@ -167,9 +167,11 @@ function conv_pkg () { else FULLPKG=$(get_pkgfullpath $SLACK32ROOT/$PKGPATH) if [ -n "$FULLPKG" ]; then - REPOVERSION=$(basename $FULLPKG |rev |cut -d- -f3 |rev) + REPOVERSION="$(basename $FULLPKG |rev |cut -d- -f3 |rev)" + REPOBLD="$(basename $FULLPKG |rev |cut -d- -f1 |cut -d. -f2- |rev)" else REPOVERSION="" + REPOBLD="" fi fi @@ -181,13 +183,15 @@ function conv_pkg () { # Do we have a local converted package already? HAVE_COMPAT32="$(get_pkgfullpath $TARGET64ROOT/${SERIES}-compat32/$BP-compat32)" if [ -n "$HAVE_COMPAT32" ]; then - COMPAT32VERSION=$(echo "$HAVE_COMPAT32" |rev|cut -d- -f3|rev) - if [ "$COMPAT32VERSION" != "$REPOVERSION" ]; then + COMPAT32VERSION="$(echo "$HAVE_COMPAT32" |rev|cut -d- -f3|rev)" + COMPAT32BLD="$(echo "$HAVE_COMPAT32" |rev|cut -d- -f1|cut -d. -f2-|rev)" + if [ "$COMPAT32VERSION" = "$REPOVERSION" -a "${COMPAT32BLD%compat32}" = "$REPOBLD" ] + then + [ $VERBOSE -eq 1 ] && echo "--- ${BP}-compat32 version '$COMPAT32VERSION' already available" + else echo ">>> Deleting old version '$COMPAT32VERSION' of '${BP}-compat32'" FILE_TO_REMOVE=$HAVE_COMPAT32 HAVE_COMPAT32="" - else - [ $VERBOSE -eq 1 ] && echo "--- ${BP}-compat32 version '$COMPAT32VERSION' already available" fi fi fi |