Re: [gentoo-dev] [PATCH 1/2] acct-group.eclass: declare the missing dependency on shadow

2020-09-08 Thread David Michael
On Tue, Sep 8, 2020 at 12:04 PM Michał Górny  wrote:
> On Tue, 2020-09-08 at 11:57 -0400, David Michael wrote:
> > Signed-off-by: David Michael 
> > ---
> >  eclass/acct-group.eclass | 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
> > index 19a378e0b06..56e6391ef42 100644
> > --- a/eclass/acct-group.eclass
> > +++ b/eclass/acct-group.eclass
> > @@ -34,8 +34,12 @@
> >  if [[ -z ${_ACCT_GROUP_ECLASS} ]]; then
> >  _ACCT_GROUP_ECLASS=1
> >
> > +# The groupadd utility is called in pkg_preinst.  It should be in IDEPEND.
> >  case ${EAPI:-0} in
> > - 7) ;;
> > + 7)
> > + BDEPEND="userland_GNU? ( sys-apps/shadow )"
>
> Nothing from shadow is used in src_install, so this BDEPEND is
> unnecessary.

It is a workaround for EAPI 7's lack of IDEPEND to attempt to handle
cross-compiling, where RDEPEND alone would never attempt to install
the package in the native root.  Other packages and eclasses have been
using this convention for the same reason (Emacs, fcaps.eclass, etc.).

Thanks.

David



Re: [gentoo-dev] [PATCH 1/2] acct-group.eclass: declare the missing dependency on shadow

2020-09-08 Thread Michał Górny
On Tue, 2020-09-08 at 11:57 -0400, David Michael wrote:
> Signed-off-by: David Michael 
> ---
>  eclass/acct-group.eclass | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
> index 19a378e0b06..56e6391ef42 100644
> --- a/eclass/acct-group.eclass
> +++ b/eclass/acct-group.eclass
> @@ -34,8 +34,12 @@
>  if [[ -z ${_ACCT_GROUP_ECLASS} ]]; then
>  _ACCT_GROUP_ECLASS=1
>  
> +# The groupadd utility is called in pkg_preinst.  It should be in IDEPEND.
>  case ${EAPI:-0} in
> - 7) ;;
> + 7)
> + BDEPEND="userland_GNU? ( sys-apps/shadow )"

Nothing from shadow is used in src_install, so this BDEPEND is
unnecessary.

> + RDEPEND="${BDEPEND}"
> + ;;
>   *) die "EAPI=${EAPI:-0} not supported";;
>  esac
>  

-- 
Best regards,
Michał Górny



signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH 1/2] acct-group.eclass: declare the missing dependency on shadow

2020-09-08 Thread David Michael
Signed-off-by: David Michael 
---
 eclass/acct-group.eclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 19a378e0b06..56e6391ef42 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -34,8 +34,12 @@
 if [[ -z ${_ACCT_GROUP_ECLASS} ]]; then
 _ACCT_GROUP_ECLASS=1
 
+# The groupadd utility is called in pkg_preinst.  It should be in IDEPEND.
 case ${EAPI:-0} in
-   7) ;;
+   7)
+   BDEPEND="userland_GNU? ( sys-apps/shadow )"
+   RDEPEND="${BDEPEND}"
+   ;;
*) die "EAPI=${EAPI:-0} not supported";;
 esac
 
-- 
2.26.2