Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] acct-user.eclass: Support ACCT_USER_ID override
Date: Wed, 06 Jan 2021 20:09:26
Message-Id: u8s95zv2s@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/2] acct-user.eclass: Support ACCT_USER_ID override by "Michał Górny"
1 >>>>> On Wed, 06 Jan 2021, Michał Górny wrote:
2
3 > On Wed, 2021-01-06 at 14:25 +0100, Ulrich Mueller wrote:
4 >> I wonder about this line. Both hyphen and underscore are valid
5 >> characters in user names.
6 >>
7 >> So, ACCT_USER_FOO_BAR_ID would override the id for both foo_bar and
8 >> foo-bar users.
9
10 > I don't think this is the problem we need to be worrying about. I mean,
11 > if someone actually created user identifiers that differ only be non-
12 > alnum characters, I think that'd the problem to tackle.
13
14 It is legal to do that, and we already have examples for both hyphen and
15 underscore in acct-user package names. So the syntax should be able to
16 cope with it.
17
18 A simple mapping from user names (which can contain a hyphen) to
19 variable names (which cannot) doesn't work and IMHO also violates the
20 principle of least surprise.
21
22 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature