summaryrefslogtreecommitdiffstats
path: root/redhat/build/is_latest_package_installed.sh
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/build/is_latest_package_installed.sh')
-rwxr-xr-xredhat/build/is_latest_package_installed.sh7
1 files changed, 4 insertions, 3 deletions
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