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

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!

Thanks,
Ludo’.




  reply	other threads:[~2021-01-18 14:49 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 [this message]
2021-01-20  8:16         ` Leo Prikler

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=875z3ul2tj.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=45836@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    /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.