From 9252035ed139519ed94c7581b45056cd66ff952d Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 12 Dec 2019 20:49:51 +0000 Subject: compat32-tools: fix the check-compat32 script --- source/compat32-tools/check-compat32 | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 source/compat32-tools/check-compat32 diff --git a/source/compat32-tools/check-compat32 b/source/compat32-tools/check-compat32 new file mode 100644 index 0000000..5ed2e91 --- /dev/null +++ b/source/compat32-tools/check-compat32 @@ -0,0 +1,75 @@ +#!/bin/bash +#$Id$ +# +# Purpose: +# To check if any of the installed -compat32 packages is older than +# the accompanying 64-bit package. +# +# Author: +# Eric Hameleers +# + +# No verbose output by default: +DEBUG=0 + +showhelp () { +cat <> Found '$PKG32'..." + + PKG64=$(echo ${FULL32} |cut -f5 -d'/' |rev |cut -f5- -d'-' |rev) + # Differentiate between eg. 'openssl' and 'openssl-solibs': + VER64=$( for PACK in $(find /var/log/packages/ -name "${PKG64}-*" |grep -v -- -compat32) ; do if [ "$(echo $PACK |cut -f5 -d'/' |rev |cut -f4- -d'-' |rev)" = "${PKG64}" ]; then echo $(echo $PACK |cut -f5 -d'/' | rev | cut -f3 -d'-' |rev) ; fi ; done ) + + # Issue a warning if the version of the 64-bit package differs: + if [ -n "$VER64" -a "$VER32" != "$VER64" ]; then + echo "** Package '$PKG64' has version '$VER64' but package '$PKG32' has version '$VER32'" + fi +done + +[ $DEBUG -ne 0 ] && echo "-- Finished checking installed packages." + -- cgit v1.2.3