all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 45836-done@debbugs.gnu.org
Subject: bug#45836: [PATCH] services: Let cups-service-type reuse base lp group.
Date: Wed, 20 Jan 2021 09:16:13 +0100	[thread overview]
Message-ID: <b8af3871582e4c1f19ffa595774423c81ab4af90.camel@student.tugraz.at> (raw)
In-Reply-To: <875z3ul2tj.fsf@gnu.org>

Am Montag, den 18.01.2021, 15:47 +0100 schrieb Ludovic Courtès:
> Hi,
> 
> Leo Prikler <leo.prikler@student.tugraz.at> skribis:
> 
> > > > diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
> > > > index 0538fb1a24..7c57222716 100644
> > > > --- a/gnu/system/shadow.scm
> > > > +++ b/gnu/system/shadow.scm
> > > > @@ -321,13 +321,13 @@ of user '~a' is undeclared")
> > > >  <user-group> objects.  Raise an error if a user account refers
> > > > to
> > > > a undefined
> > > >  group."
> > > >    (define accounts
> > > > -    (filter user-account? accounts+groups))
> > > > +    (delete-duplicates (filter user-account? accounts+groups)
> > > > eq?))
> > > >  
> > > >    (define user-specs
> > > >      (map user-account->gexp accounts))
> > > >  
> > > >    (define groups
> > > > -    (filter user-group? accounts+groups))
> > > > +    (delete-duplicates (filter user-group? accounts+groups)
> > > > eq?))
> > > 
> > > Why use ‘eq?’?  I’d use ‘equal?’, but note that <user-account>
> > > records
> > > cannot necessarily be compared with ‘equal?’ because of the
> > > thunked
> > > ‘home-directory’ field (‘equal?’ is meaningless for procedures).
> > My personal reasoning (and perhaps a rather strong opinion) is,
> > that it
> > is an error to add duplicate users even if they happen to be
> > equal?. 
> > eq? is only provided as a way out for the specific case of
> > services,
> > that need to do so for safety reasons – e.g. cups to not allow
> > overriding of the lp group if it has been removed from the OS
> > groups
> > for whichever reason.
> 
> Ah I see, makes sense to me!
I've now pushed it with eq?, if there's a (good!) reason to change that
to equal?, it can still be done later.

Regards,
Leo





      reply	other threads:[~2021-01-20  8:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  1:09 bug#45836: cups-service-type duplicates lp group Leo Prikler
2021-01-13 11:28 ` Ludovic Courtès
2021-01-13 12:06   ` Leo Prikler
2021-01-14 11:38     ` Ludovic Courtès
2021-01-14 13:06 ` bug#45836: [PATCH] services: Let cups-service-type reuse base " Leo Prikler
2021-01-16 18:37   ` Ludovic Courtès
2021-01-16 19:49     ` Leo Prikler
2021-01-18 14:47       ` Ludovic Courtès
2021-01-20  8:16         ` Leo Prikler [this message]

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=b8af3871582e4c1f19ffa595774423c81ab4af90.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=45836-done@debbugs.gnu.org \
    --cc=ludo@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.