On Wed, Aug 14, 2019, 5:26 PM Michał Górny <mgo...@gentoo.org> wrote:

> On Wed, 2019-08-14 at 17:14 -0400, Mike Gilbert wrote:
> > Closes: https://bugs.gentoo.org/691478
> > Signed-off-by: Mike Gilbert <flop...@gentoo.org>
> > ---
> >  eclass/acct-user.eclass | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
> > index 60009643c144..cec5d0506879 100644
> > --- a/eclass/acct-user.eclass
> > +++ b/eclass/acct-user.eclass
> > @@ -334,6 +334,11 @@ acct-user_pkg_preinst() {
> >               if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then
> >
>  ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]}
> >               fi
> > +             # Path might be missing due to INSTALL_MASK, etc.
> > +             # https://bugs.gentoo.org/691478
> > +             if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
> > +                     keepdir "${ACCT_USER_HOME}"
> > +             fi
>
> Doesn't it violate the principle of least surprise if you recreate
> the path that user intentionally wanted stripped?
>
> >               fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
> >               fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
> >       fi
>
> --
> Best regards,
> Michał Górny
>

I was debating that with myself after I sent this. I suppose we could just
skip it if it is missing.

>

Reply via email to