commit: 64c2f2b034391cf4e67dcf6f603497c87c0a9f96
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 11 16:12:36 2016 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Dec 11 19:59:36 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64c2f2b0
selinux-policy-2.eclass: eapply for EAPI6
eclass/selinux-policy-2.eclass | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index 12d6bf2..fbca2ae 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -154,16 +154,25 @@ selinux-policy-2_src_prepare() {
# Patch the sources with the base patchbundle
if [[ -n ${BASEPOL} ]] && [[ "${BASEPOL}" != "9999" ]]; then
cd "${S}"
- EPATCH_MULTI_MSG="Applying SELinux policy updates ... " \
- EPATCH_SUFFIX="patch" \
- EPATCH_SOURCE="${WORKDIR}" \
- EPATCH_FORCE="yes" \
- epatch
+ if [[ ${EAPI:-0} == 5 ]]; then
+ EPATCH_MULTI_MSG="Applying SELinux policy updates ... "
\
+ EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}" \
+ EPATCH_FORCE="yes" \
+ epatch
+ else
+ einfo "Applying SELinux policy updates ... "
+ eapply -p0
"${WORKDIR}/0001-full-patch-against-stable-release.patch"
+ fi
fi
# Call in epatch_user. We do this early on as we start moving
# files left and right hereafter.
- epatch_user
+ if [[ ${EAPI:-0} == 5 ]]; then
+ epatch_user
+ else
+ eapply_user
+ fi
# Copy additional files to the 3rd_party/ location
if [[ "$(declare -p POLICY_FILES 2>/dev/null 2>&1)" == "declare -a"* ]]
||
@@ -183,7 +192,11 @@ selinux-policy-2_src_prepare() {
cd "${S}/refpolicy/policy/modules"
for POLPATCH in ${POLICY_PATCH[@]};
do
- epatch "${POLPATCH}"
+ if [[ ${EAPI:-0} == 5 ]]; then
+ epatch "${POLPATCH}"
+ else
+ eapply "${POLPATCH}"
+ fi
done
fi