public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Gilbert <floppym@gentoo.org>
To: Gentoo Dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
Date: Wed, 14 Aug 2019 17:38:05 -0400	[thread overview]
Message-ID: <CAJ0EP42pE6uzWrgMyCsShx+fkaa_qPQ_q_jjQH9tfD6_+Ghgiw@mail.gmail.com> (raw)
In-Reply-To: <abfdf743d7f9ea58a698964044b2580933baf782.camel@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

On Wed, Aug 14, 2019, 5:26 PM Michał Górny <mgorny@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 <floppym@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.

>

[-- Attachment #2: Type: text/html, Size: 2454 bytes --]

  reply	other threads:[~2019-08-14 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 21:14 [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst Mike Gilbert
2019-08-14 21:26 ` Michał Górny
2019-08-14 21:38   ` Mike Gilbert [this message]
2019-08-14 21:29 ` Michael Orlitzky
2019-08-14 21:41   ` Mike Gilbert
2019-08-15 12:32     ` Michael Orlitzky
2019-08-15 15:00       ` Mike Gilbert
2019-08-15 15:33         ` Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ0EP42pE6uzWrgMyCsShx+fkaa_qPQ_q_jjQH9tfD6_+Ghgiw@mail.gmail.com \
    --to=floppym@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox