From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 20 03:16:18 2021 Received: (at 45836-done) by debbugs.gnu.org; 20 Jan 2021 08:16:18 +0000 Received: from localhost ([127.0.0.1]:52755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l28f4-0007BD-0f for submit@debbugs.gnu.org; Wed, 20 Jan 2021 03:16:18 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:47213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l28f2-0007B4-B4 for 45836-done@debbugs.gnu.org; Wed, 20 Jan 2021 03:16:16 -0500 Received: from nijino.local (217-149-173-242.nat.highway.telekom.at [217.149.173.242]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4DLJJG2P3Dz1LBRv; Wed, 20 Jan 2021 09:16:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4DLJJG2P3Dz1LBRv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1611130574; bh=JJs3b3eU/L/yrMfcOqK2jK2u+a/3v9Psi4uEHj2eTts=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=MHJj8hMC/bY9UvRXJg0LQweZwHecPPaTjtUxaHSguQVLyxrt3D+HyKUhgD0JqIuuA auxHvzyRsK5CAl6gr3lfvr1FG6aOrr5WzKI7Eg3afWdfDPOvir4N3A9fHqRP2gdhDH h0K6LW/swgjucSIs0ccVq0RJ0DHuUidVMQarAhj8= Message-ID: Subject: Re: [PATCH] services: Let cups-service-type reuse base lp group. From: Leo Prikler To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Wed, 20 Jan 2021 09:16:13 +0100 In-Reply-To: <875z3ul2tj.fsf@gnu.org> References: <20210114130610.31936-1-leo.prikler@student.tugraz.at> <875z3wzq1k.fsf@gnu.org> <5c790abbd52abae17c6b449b4982380f9ae26806.camel@student.tugraz.at> <875z3ul2tj.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45836-done Cc: 45836-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Am Montag, den 18.01.2021, 15:47 +0100 schrieb Ludovic Courtès: > Hi, > > Leo Prikler 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") > > > > 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 > > > 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