eclass/selinux: fix POLICY_PATCH applying

need to open a bug upstream - current discussions on IRC
This commit is contained in:
Mathieu Tortuyaux 2021-06-04 17:09:53 +02:00
parent da7e024e1f
commit 9e3a91b57d

View File

@ -179,11 +179,12 @@ selinux-policy-2_src_prepare() {
# Apply the additional patches refered to by the module ebuild. # Apply the additional patches refered to by the module ebuild.
# But first some magic to differentiate between bash arrays and strings # But first some magic to differentiate between bash arrays and strings
if [[ "$(declare -p POLICY_PATCH 2>/dev/null 2>&1)" == "declare -a"* ]]; then cd "${S}/refpolicy/policy/modules"
[[ -n ${POLICY_PATCH[*]} ]] && eapply -d "${S}/refpolicy/policy/modules" "${POLICY_PATCH[@]}" for POLPATCH in ${POLICY_PATCH[@]};
else do
[[ -n ${POLICY_PATCH} ]] && eapply -d "${S}/refpolicy/policy/modules" ${POLICY_PATCH} einfo "Installing ${POLPATCH}"
fi eapply -p0 "${POLPATCH}"
done
# Collect only those files needed for this particular module # Collect only those files needed for this particular module
for i in ${MODS}; do for i in ${MODS}; do