[PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

Michał Górny-5
Append RESTRICT="!test? ( test )" in the default case when virtualx
is conditional to USE=test.  This fixes 440 MissingTestRestrict
warnings.

Signed-off-by: Michał Górny <[hidden email]>
---
 eclass/virtualx.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 40eeea5463bc..6aba6bf488dd 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -89,6 +89,8 @@ case ${VIRTUALX_REQUIRED} in
  fi
  RDEPEND=""
  IUSE="${VIRTUALX_REQUIRED}"
+ [[ ${VIRTUALX_REQUIRED} == test ]] &&
+ RESTRICT+=" !test? ( test )"
  ;;
 esac
 
--
2.24.1


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

Aaron Bauman-2
On Wed, Dec 11, 2019 at 03:58:33PM +0100, Michał Górny wrote:

> Append RESTRICT="!test? ( test )" in the default case when virtualx
> is conditional to USE=test.  This fixes 440 MissingTestRestrict
> warnings.
>
> Signed-off-by: Michał Górny <[hidden email]>
> ---
>  eclass/virtualx.eclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> index 40eeea5463bc..6aba6bf488dd 100644
> --- a/eclass/virtualx.eclass
> +++ b/eclass/virtualx.eclass
> @@ -89,6 +89,8 @@ case ${VIRTUALX_REQUIRED} in
>   fi
>   RDEPEND=""
>   IUSE="${VIRTUALX_REQUIRED}"
> + [[ ${VIRTUALX_REQUIRED} == test ]] &&
> + RESTRICT+=" !test? ( test )"
>   ;;
>  esac
>  
> --
> 2.24.1
>
>
Acked-by: Aaron Bauman <[hidden email]>

--
Cheers,
Aaron

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

NP-Hardass-2
In reply to this post by Michał Górny-5
On 12/11/19 9:58 AM, Michał Górny wrote:

> Append RESTRICT="!test? ( test )" in the default case when virtualx
> is conditional to USE=test.  This fixes 440 MissingTestRestrict
> warnings.
>
> Signed-off-by: Michał Górny <[hidden email]>
> ---
>  eclass/virtualx.eclass | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> index 40eeea5463bc..6aba6bf488dd 100644
> --- a/eclass/virtualx.eclass
> +++ b/eclass/virtualx.eclass
> @@ -89,6 +89,8 @@ case ${VIRTUALX_REQUIRED} in
>   fi
>   RDEPEND=""
>   IUSE="${VIRTUALX_REQUIRED}"
> + [[ ${VIRTUALX_REQUIRED} == test ]] &&
> + RESTRICT+=" !test? ( test )"
>   ;;
>  esac
>  
>
Is there a better way to address this than editing a ton of eclasses
independently?

--
NP-Hardass


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

Mike Gilbert-2
On Thu, Dec 12, 2019 at 12:02 PM NP-Hardass <[hidden email]> wrote:

>
> On 12/11/19 9:58 AM, Michał Górny wrote:
> > Append RESTRICT="!test? ( test )" in the default case when virtualx
> > is conditional to USE=test.  This fixes 440 MissingTestRestrict
> > warnings.
> >
> > Signed-off-by: Michał Górny <[hidden email]>
> > ---
> >  eclass/virtualx.eclass | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> > index 40eeea5463bc..6aba6bf488dd 100644
> > --- a/eclass/virtualx.eclass
> > +++ b/eclass/virtualx.eclass
> > @@ -89,6 +89,8 @@ case ${VIRTUALX_REQUIRED} in
> >               fi
> >               RDEPEND=""
> >               IUSE="${VIRTUALX_REQUIRED}"
> > +             [[ ${VIRTUALX_REQUIRED} == test ]] &&
> > +                     RESTRICT+=" !test? ( test )"
> >               ;;
> >  esac
> >
> >
>
> Is there a better way to address this than editing a ton of eclasses
> independently?

Not really.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

Alexis Ballier-2
On Thu, 2019-12-12 at 12:14 -0500, Mike Gilbert wrote:

> On Thu, Dec 12, 2019 at 12:02 PM NP-Hardass <[hidden email]>
> wrote:
> > On 12/11/19 9:58 AM, Michał Górny wrote:
> > > Append RESTRICT="!test? ( test )" in the default case when
> > > virtualx
> > > is conditional to USE=test.  This fixes 440 MissingTestRestrict
> > > warnings.
> > >
> > > Signed-off-by: Michał Górny <[hidden email]>
> > > ---
> > >  eclass/virtualx.eclass | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> > > index 40eeea5463bc..6aba6bf488dd 100644
> > > --- a/eclass/virtualx.eclass
> > > +++ b/eclass/virtualx.eclass
> > > @@ -89,6 +89,8 @@ case ${VIRTUALX_REQUIRED} in
> > >               fi
> > >               RDEPEND=""
> > >               IUSE="${VIRTUALX_REQUIRED}"
> > > +             [[ ${VIRTUALX_REQUIRED} == test ]] &&
> > > +                     RESTRICT+=" !test? ( test )"
> > >               ;;
> > >  esac
> > >
> > >
> >
> > Is there a better way to address this than editing a ton of
> > eclasses
> > independently?
>
> Not really.
>

Seems a good candidate for a future EAPI


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] virtualx.eclass: Append RESTRICT="!test? ( test )" by default

Kent Fredric-2
On Fri, 13 Dec 2019 12:50:00 +0100
Alexis Ballier <[hidden email]> wrote:

> Seems a good candidate for a future EAPI

In theory, there are packages that can execute src_test when USE="test"
is not satisfied.

Just I don't tend to see this in practice.

attachment0 (849 bytes) Download Attachment