dev-db/mongodb: fix REPLACING_VERSION detection #589458
authorUltrabug <ultrabug@gentoo.org>
Fri, 19 Aug 2016 12:59:39 +0000 (14:59 +0200)
committerUltrabug <ultrabug@gentoo.org>
Fri, 19 Aug 2016 12:59:39 +0000 (14:59 +0200)
Package-Manager: portage-2.2.27

dev-db/mongodb/mongodb-2.6.11.ebuild
dev-db/mongodb/mongodb-2.6.12.ebuild
dev-db/mongodb/mongodb-2.6.8.ebuild
dev-db/mongodb/mongodb-3.0.10.ebuild
dev-db/mongodb/mongodb-3.0.12.ebuild
dev-db/mongodb/mongodb-3.2.8.ebuild

index 72addb11db5088219ad5c16eeb21da16d7e21b35..3f63202fa4574b39999d6c087252cdd4c2ef6c57 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -156,25 +156,29 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 2.6 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
-               ewarn " "
-               if use mms-agent; then
-                       ewarn "MMS Agent configuration file has been moved to :"
-                       ewarn "  /etc/mms-agent.conf"
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 2.6 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
+                       ewarn " "
+                       if use mms-agent; then
+                               ewarn "MMS Agent configuration file has been moved to :"
+                               ewarn "  /etc/mms-agent.conf"
+                       fi
+                       break
+               else
+                       if use mms-agent; then
+                               elog "Edit your MMS Agent configuration file :"
+                               elog "  /etc/mms-agent.conf"
+                       fi
                fi
-       else
-               if use mms-agent; then
-                       elog "Edit your MMS Agent configuration file :"
-                       elog "  /etc/mms-agent.conf"
-               fi
-       fi
+       done
 }
index b206aeccb0f6f3cdc836f08a7a1da924d76aef69..3f63202fa4574b39999d6c087252cdd4c2ef6c57 100644 (file)
@@ -156,25 +156,29 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 2.6 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
-               ewarn " "
-               if use mms-agent; then
-                       ewarn "MMS Agent configuration file has been moved to :"
-                       ewarn "  /etc/mms-agent.conf"
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 2.6 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
+                       ewarn " "
+                       if use mms-agent; then
+                               ewarn "MMS Agent configuration file has been moved to :"
+                               ewarn "  /etc/mms-agent.conf"
+                       fi
+                       break
+               else
+                       if use mms-agent; then
+                               elog "Edit your MMS Agent configuration file :"
+                               elog "  /etc/mms-agent.conf"
+                       fi
                fi
-       else
-               if use mms-agent; then
-                       elog "Edit your MMS Agent configuration file :"
-                       elog "  /etc/mms-agent.conf"
-               fi
-       fi
+       done
 }
index 1fff19c51cdcef053710d9125d0cc62a67ae2c11..4059772252d0aff6905db92f79e55e58ab4859b4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -156,25 +156,29 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 2.6 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
-               ewarn " "
-               if use mms-agent; then
-                       ewarn "MMS Agent configuration file has been moved to :"
-                       ewarn "  /etc/mms-agent.conf"
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 2.6 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/2.6-upgrade/"
+                       ewarn " "
+                       if use mms-agent; then
+                               ewarn "MMS Agent configuration file has been moved to :"
+                               ewarn "  /etc/mms-agent.conf"
+                       fi
+                       break
+               else
+                       if use mms-agent; then
+                               elog "Edit your MMS Agent configuration file :"
+                               elog "  /etc/mms-agent.conf"
+                       fi
                fi
-       else
-               if use mms-agent; then
-                       elog "Edit your MMS Agent configuration file :"
-                       elog "  /etc/mms-agent.conf"
-               fi
-       fi
+       done
 }
index 4c1614ece5c186e2a8a6f59fdf8d7e0ea7bcfdf5..437e0b06baa8d28b758e3243fc8d08432285773f 100644 (file)
@@ -137,20 +137,24 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
-               ewarn " "
-               ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
-               ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
-               ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
-       fi
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 3.0 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+                       ewarn " "
+                       ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+                       ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+                       ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+                       break
+               fi
+       done
 }
index 4c1614ece5c186e2a8a6f59fdf8d7e0ea7bcfdf5..437e0b06baa8d28b758e3243fc8d08432285773f 100644 (file)
@@ -137,20 +137,24 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
-               ewarn " "
-               ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
-               ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
-               ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
-       fi
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 3.0 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+                       ewarn " "
+                       ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+                       ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+                       ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+                       break
+               fi
+       done
 }
index 1854cf2241fe8d4c904e1631d3b5a59b68210131..15b346cad3be5addd48c33cab29ec1f2cbf148e6 100644 (file)
@@ -160,22 +160,26 @@ src_test() {
 }
 
 pkg_postinst() {
-       if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
-               ewarn "!! IMPORTANT !!"
-               ewarn " "
-               ewarn "${PN} configuration files have changed !"
-               ewarn " "
-               ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
-               ewarn " "
-               ewarn "Make sure you also follow the upgrading process :"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
-               ewarn " "
-               ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
-               ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
-               ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
-               ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
-       fi
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least 3.0 ${v}; then
+                       ewarn "!! IMPORTANT !!"
+                       ewarn " "
+                       ewarn "${PN} configuration files have changed !"
+                       ewarn " "
+                       ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/manual/reference/configuration-options/"
+                       ewarn " "
+                       ewarn "Make sure you also follow the upgrading process :"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+                       ewarn " "
+                       ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+                       ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+                       ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+                       ewarn "  http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+                       break
+               fi
+       done
 
        ewarn "Make sure to read the release notes and follow the upgrade process:"
        ewarn "  https://docs.mongodb.org/manual/release-notes/3.2/"