www-misc/zoneminder: Properly use REPLACING_VERSIONS
authorAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 15 Dec 2016 21:06:45 +0000 (22:06 +0100)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Thu, 15 Dec 2016 21:07:13 +0000 (22:07 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

www-misc/zoneminder/zoneminder-1.30.0.ebuild

index 60f391573c1c61aca6f1ad4da02172935657e201..d041e19e156ace15580d5097adf91b4e3e0637ca 100644 (file)
@@ -14,7 +14,7 @@
 
 EAPI=6
 
-inherit perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd
+inherit versionator perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd
 
 MY_PN="ZoneMinder"
 
@@ -168,6 +168,10 @@ src_install() {
 pkg_postinst() {
        readme.gentoo_print_elog
 
-       local myold=${REPLACING_VERSIONS}
-       [ "${myold}" = ${PV} ] || elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script."
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least ${PV} ${v}; then
+                       elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script."
+               fi
+       done
 }