Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH v4 08/19] user.eclass: Factor out finding nologin into separate function
Date: Thu, 13 Jun 2019 13:18:54
Message-Id: 0cac0be8163c7ff3f7b54bc1521086edc7563aba.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v4 08/19] user.eclass: Factor out finding nologin into separate function by Michael Orlitzky
1 On Thu, 2019-06-13 at 09:01 -0400, Michael Orlitzky wrote:
2 > On 6/13/19 1:33 AM, Michał Górny wrote:
3 > > > > + eshell=$(user_get_nologin)
4 > > >
5 > > > Then this would have to become
6 > > >
7 > > > eshell=$(userland_get_nologin "${USERLAND}")
8 > >
9 > > Do you have any real use for that?
10 > >
11 >
12 > No. It's a better design IMO since you can e.g. test the function by
13 > passing it an argument rather than by setting a global variable (which
14 > has other consequences). But no immediate application.
15 >
16
17 I'm sorry but this makes no sense. The function already depends on ROOT
18 variable, and on presence of specific files in the filesystem. I see no
19 reason to make USERLAND special here.
20
21 Furthermore, it's an internal function with no external application.
22 It has two call sites, and in both we want the same value of USERLAND
23 (which is defined by profiles) to apply.
24
25 --
26 Best regards,
27 Michał Górny

Attachments

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