From a615d19df88eb2e989316b480519161945dbc7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Tue, 27 Nov 2018 21:34:48 +0100 Subject: RPM: merge redhat directory with master branch --- redhat/build/is_latest_package_installed.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'redhat/build/is_latest_package_installed.sh') diff --git a/redhat/build/is_latest_package_installed.sh b/redhat/build/is_latest_package_installed.sh index 685fa7a05..7923eca50 100755 --- a/redhat/build/is_latest_package_installed.sh +++ b/redhat/build/is_latest_package_installed.sh @@ -8,8 +8,9 @@ TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION}) # Package containing "~" (e.g. R14 preversion tarballs): -if [ "${INSTALLED/\~/}" != "${INSTALLED}" ]; then - if [ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then +if [ "${TARBALL/\~/}" != "${TARBALL}" ]; then + # Only compare the part after '~' + if [ "${INSTALLED##*_}" = "${TARBALL#*\~}" ] ||[ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then echo "Latest package '${PKGNAME}' version '${TARBALL}' is already built and installed." exit 0 fi @@ -21,7 +22,7 @@ else fi # Other package (e.g. QT3) - if [ "${INSTALLED}" = "${SPEC}" ]; then + if [ "${INSTALLED}" = "${SPEC}" ] || [ "${INSTALLED}$(rpm -E %dist)" = "${SPEC}" ]; then echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed." exit 0 fi -- cgit v1.2.1