diff options
author | Jason Zaman <perfinion@gentoo.org> | 2016-12-12 00:12:36 +0800 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2016-12-12 03:59:36 +0800 |
commit | 64c2f2b034391cf4e67dcf6f603497c87c0a9f96 (patch) | |
tree | 1fb0ffc4dd5bdb1ec6f9ecd82c04a76340e047a3 | |
parent | selinux-policy-2.eclass: tidy if syntax (diff) | |
download | gentoo-64c2f2b034391cf4e67dcf6f603497c87c0a9f96.tar.gz gentoo-64c2f2b034391cf4e67dcf6f603497c87c0a9f96.tar.bz2 gentoo-64c2f2b034391cf4e67dcf6f603497c87c0a9f96.zip |
selinux-policy-2.eclass: eapply for EAPI6
-rw-r--r-- | eclass/selinux-policy-2.eclass | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass index 12d6bf26bae5..fbca2aeb0c4c 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 |