perfinion 15/04/04 17:11:35 Modified: ChangeLog selinux-policy-2.eclass Log: Drop EAPI<5 from selinux-policy-2.eclass
Revision Changes Path 1.1582 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1582&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1582&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1581&r2=1.1582 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.1581 retrieving revision 1.1582 diff -u -r1.1581 -r1.1582 --- ChangeLog 1 Apr 2015 18:45:04 -0000 1.1581 +++ ChangeLog 4 Apr 2015 17:11:35 -0000 1.1582 @@ -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; <[email protected]> selinux-policy-2.eclass: + Drop EAPI<5 from selinux-policy-2.eclass 01 Apr 2015; Davide Pesavento <[email protected]> qt4-build.eclass, qt4-build-multilib.eclass, qt5-build.eclass: 1.31 eclass/selinux-policy-2.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/selinux-policy-2.eclass?rev=1.31&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/selinux-policy-2.eclass?rev=1.31&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/selinux-policy-2.eclass?r1=1.30&r2=1.31 Index: selinux-policy-2.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- selinux-policy-2.eclass 7 Dec 2014 11:13:35 -0000 1.30 +++ selinux-policy-2.eclass 4 Apr 2015 17:11:35 -0000 1.31 @@ -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 @@ 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 @@ 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 @@ # 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
