Drop EAPI<5 from selinux-policy-2.eclass
authorJason Zaman <perfinion@gentoo.org>
Sat, 4 Apr 2015 17:11:35 +0000 (17:11 +0000)
committerJason Zaman <perfinion@gentoo.org>
Sat, 4 Apr 2015 17:11:35 +0000 (17:11 +0000)
eclass/ChangeLog
eclass/selinux-policy-2.eclass

index 6e17187e43649011460de38b41bf7ecf2d66f818..b8c0f71adf82c6ac66dd7de5b6f0c48c5424b679 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1581 2015/04/01 18:45:04 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1582 2015/04/04 17:11:35 perfinion Exp $
+
+  04 Apr 2015; <jason@gentoo.org> selinux-policy-2.eclass:
+  Drop EAPI<5 from selinux-policy-2.eclass
 
   01 Apr 2015; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass,
   qt4-build-multilib.eclass, qt5-build.eclass:
index e2e60e15c19ed3462aa87e8ef84269475ce3d05f..cc61db8361d4638de47a6cba32cc2b19f7567e7b 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.30 2014/12/07 11:13:35 perfinion Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.31 2015/04/04 17:11:35 perfinion Exp $
 
 # Eclass for installing SELinux policy, and optionally
 # reloading the reference-policy based modules.
@@ -117,18 +117,16 @@ DEPEND="${RDEPEND}
        sys-devel/m4
        >=sys-apps/checkpolicy-2.0.21"
 
-SELINUX_EXPF="src_unpack src_compile src_install pkg_postinst pkg_postrm"
 case "${EAPI:-0}" in
-       2|3|4|5) SELINUX_EXPF+=" src_prepare" ;;
-       *) ;;
+       0|1|2|3|4) die "EAPI<5 is not supported";;
+       *) : ;;
 esac
 
-EXPORT_FUNCTIONS ${SELINUX_EXPF}
+EXPORT_FUNCTIONS "src_unpack src_prepare src_compile src_install pkg_postinst pkg_postrm"
 
 # @FUNCTION: selinux-policy-2_src_unpack
 # @DESCRIPTION:
-# Unpack the policy sources as offered by upstream (refpolicy). In case of EAPI
-# older than 2, call src_prepare too.
+# Unpack the policy sources as offered by upstream (refpolicy).
 selinux-policy-2_src_unpack() {
        if [[ "${BASEPOL}" != "9999" ]];
        then
@@ -136,9 +134,6 @@ selinux-policy-2_src_unpack() {
        else
                git-2_src_unpack
        fi
-
-       # Call src_prepare explicitly for EAPI 0 or 1
-       has "${EAPI:-0}" 0 1 && selinux-policy-2_src_prepare
 }
 
 # @FUNCTION: selinux-policy-2_src_prepare
@@ -338,17 +333,17 @@ selinux-policy-2_pkg_postinst() {
 # deactivating the policy on the system.
 selinux-policy-2_pkg_postrm() {
        # Only if we are not upgrading
-       if [[ "${EAPI}" -lt 4 || -z "${REPLACED_BY_VERSION}" ]];
+       if [[ -z "${REPLACED_BY_VERSION}" ]];
        then
                # build up the command in the case of multiple modules
                local COMMAND
                for i in ${MODS}; do
                        COMMAND="-r ${i} ${COMMAND}"
                done
-       
+
                for i in ${POLICY_TYPES}; do
                        einfo "Removing the following modules from the $i module store: ${MODS}"
-       
+
                        semodule -s ${i} ${COMMAND}
                        if [ $? -ne 0 ];
                        then