Re: [gentoo-dev] [PATCH 2/2] selinux-policy-2.eclass: drop EAPI 5

2020-11-03 Thread Ulrich Mueller
> On Tue, 03 Nov 2020, Ulrich Mueller wrote:

> Presumably it would also be cleaner to test if POLICY_PATCH is an array,
> and use '"${POLICY_PATCH[@]}"' if it is but '${POLICY_PATCH}' if it is
> not.

In fact you could use the same code as in default src_prepare:
https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-90001r2

Ulrich


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH 2/2] selinux-policy-2.eclass: drop EAPI 5

2020-11-03 Thread Ulrich Mueller
> On Mon, 02 Nov 2020, David Michael wrote:
 
>   for POLPATCH in ${POLICY_PATCH[@]};
>   do
> - if [[ ${EAPI:-0} == 5 ]]; then
> - epatch "${POLPATCH}"
> - else
> - eapply "${POLPATCH}"
> - fi
> + eapply "${POLPATCH}"
>   done

eapply can accept multiple parameters, so I think that a simple
'eapply ${POLICY_PATCH[@]}' would do the job.

Presumably it would also be cleaner to test if POLICY_PATCH is an array,
and use '"${POLICY_PATCH[@]}"' if it is but '${POLICY_PATCH}' if it is
not.

Ulrich


signature.asc
Description: PGP signature