Re: [gentoo-portage-dev] [PATCH] doins: fix D check, add EPREFIX check
On 25-07-2022 19:29:35 -0400, Mike Gilbert wrote: > Could you please create a PR at https://github.com/gentoo/portage so > that the CI system can test the changes for this patch series? https://github.com/gentoo/portage/pull/866 Thanks, Fabian -- Fabian Groffen Gentoo on a different level signature.asc Description: PGP signature
Re: [gentoo-portage-dev] [PATCH] doins: fix D check, add EPREFIX check
On 25-07-2022 19:50:41 +0200, Ulrich Mueller wrote: > > On Mon, 25 Jul 2022, Fabian Groffen wrote: > > > @@ -50,6 +51,16 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" > > ]]; then > > __helpers_die "${helper} used with \${D} or \${ED}" > > exit 1 > > fi > > +if [[ -n ${EPREFIX} && \ > > + ${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]]; > > The semicolon is redundant. removed, thanks -- Fabian Groffen Gentoo on a different level signature.asc Description: PGP signature
Re: [gentoo-portage-dev] [PATCH] doins: fix D check, add EPREFIX check
Could you please create a PR at https://github.com/gentoo/portage so that the CI system can test the changes for this patch series?
Re: [gentoo-portage-dev] [PATCH] doins: fix D check, add EPREFIX check
> On Mon, 25 Jul 2022, Fabian Groffen wrote: > @@ -50,6 +51,16 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; > then > __helpers_die "${helper} used with \${D} or \${ED}" > exit 1 > fi > +if [[ -n ${EPREFIX} && \ > + ${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]]; The semicolon is redundant. > +then > + __vecho "---" 1>&2 > + __vecho "You should not use \${EPREFIX} with helpers." 1>&2 > + __vecho " --> ${_E_INSDESTTREE_}" 1>&2 > + __vecho "---" 1>&2 > + __helpers_die "${helper} used with \${EPREFIX}" > + exit 1 > +fi signature.asc Description: PGP signature
[gentoo-portage-dev] [PATCH] doins: fix D check, add EPREFIX check
bin/ebuild-helpers/doins: fix D check, add EPREFIX check ED = D/EPREFIX, so checking for ED includes EPREFIX, which when this is absent fails to check for D. Simply check for D instead, which catches both the case for D and ED. Add check for usage of EPREFIX, like for using D with helpers. Signed-off-by: Fabian Groffen diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index 24fe48121..4315a038f 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -42,7 +42,7 @@ if ! ___eapi_has_prefix_variables; then export ED="${D}" fi -if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then +if [[ ${_E_INSDESTTREE_#${D}} != "${_E_INSDESTTREE_}" ]]; then __vecho "---" 1>&2 __vecho "You should not use \${D} or \${ED} with helpers." 1>&2 __vecho " --> ${_E_INSDESTTREE_}" 1>&2 @@ -50,6 +51,16 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then __helpers_die "${helper} used with \${D} or \${ED}" exit 1 fi +if [[ -n ${EPREFIX} && \ + ${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]]; +then + __vecho "---" 1>&2 + __vecho "You should not use \${EPREFIX} with helpers." 1>&2 + __vecho " --> ${_E_INSDESTTREE_}" 1>&2 + __vecho "---" 1>&2 + __helpers_die "${helper} used with \${EPREFIX}" + exit 1 +fi if ___eapi_doins_and_newins_preserve_symlinks; then DOINS_ARGS+=( --preserve_symlinks ) -- Fabian Groffen Gentoo on a different level signature.asc Description: PGP signature