sys-fs/dmraid: ensure REPLACING_VERSIONS is handled when it is a list
authorIan Stakenvicius <axs@gentoo.org>
Mon, 25 Jul 2016 15:46:02 +0000 (11:46 -0400)
committerIan Stakenvicius <axs@gentoo.org>
Mon, 25 Jul 2016 16:21:24 +0000 (12:21 -0400)
..and also fix intentation

Bug: http://bugs.gentoo.org/589528

Package-Manager: portage-2.2.28

sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild

index 93f8ededd67735ec2301b09815c659b0ab8cafab..3b1934872df7ee41c230295b681d8e5d697c728e 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$
 
@@ -75,25 +75,26 @@ src_install() {
 
 pkg_postinst() {
        if [[ -z ${REPLACING_VERSIONS} ]]; then
-       elog "For booting Gentoo from Device-Mapper RAID you can use a Genkernel initramfs."
-       elog
-       elog "Genkernel will generate the kernel and the initramfs with a statically "
-       elog "linked dmraid binary (its own version which may not be the same as this version):"
-       elog "\t emerge -av sys-kernel/genkernel"
-       elog "\t genkernel --dmraid all"
+               elog "For booting Gentoo from Device-Mapper RAID you can use a Genkernel initramfs."
+               elog
+               elog "Genkernel will generate the kernel and the initramfs with a statically "
+               elog "linked dmraid binary (its own version which may not be the same as this version):"
+               elog "\t emerge -av sys-kernel/genkernel"
+               elog "\t genkernel --dmraid all"
        fi
-       if [[ ${REPLACING_VERSIONS} != ${PVR} ]]; then
-       elog
-       elog "A pre-patched distfile of this version of DMRAID has been installed at"
-       elog "/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2 , to support using it within a"
-       elog "Genkernel initramfs."
-       elog
+       # skip this message if this revision has already been emerged
+       if [[ " ${REPLACING_VERSIONS} " != *\ ${PVR}\ * ]]; then
+               elog
+               elog "A pre-patched distfile of this version of DMRAID has been installed at"
+               elog "/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2 , to support using it within a"
+               elog "Genkernel initramfs."
+               elog
        fi
        if [[ -z ${REPLACING_VERSIONS} ]]; then
-       elog "If you would rather use this version of DMRAID with Genkernel, update the following"
-       elog "in /etc/genkernel.conf:"
-       elog "\t DMRAID_VER=\"${MY_PV}\""
-       elog "\t DMRAID_SRCTAR=\"/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2\""
-       elog
+               elog "If you would rather use this version of DMRAID with Genkernel, update the following"
+               elog "in /etc/genkernel.conf:"
+               elog "\t DMRAID_VER=\"${MY_PV}\""
+               elog "\t DMRAID_SRCTAR=\"/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2\""
+               elog
        fi
 }