From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 93469138334 for ; Thu, 13 Jun 2019 13:18:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEE82E0991; Thu, 13 Jun 2019 13:18:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 81BB3E092A for ; Thu, 13 Jun 2019 13:18:47 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 45EA0345FE9; Thu, 13 Jun 2019 13:18:43 +0000 (UTC) Message-ID: <0cac0be8163c7ff3f7b54bc1521086edc7563aba.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH v4 08/19] user.eclass: Factor out finding nologin into separate function From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Thu, 13 Jun 2019 15:18:38 +0200 In-Reply-To: <6ae45adb-2e3a-df7e-b024-3a471ebd6eba@gentoo.org> References: <20190611162347.2989-1-mgorny@gentoo.org> <20190611162347.2989-9-mgorny@gentoo.org> <312d136a-3f25-013a-0c2e-93a5aa0f659e@gentoo.org> <6ae45adb-2e3a-df7e-b024-3a471ebd6eba@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-hHSOtHRVnrscxNQvWYjT" User-Agent: Evolution 3.30.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 3f40f904-6637-4054-8cb0-c8c2eb75aebb X-Archives-Hash: b8c51f28622b5afedd11def4d8fc2d42 --=-hHSOtHRVnrscxNQvWYjT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2019-06-13 at 09:01 -0400, Michael Orlitzky wrote: > On 6/13/19 1:33 AM, Micha=C5=82 G=C3=B3rny wrote: > > > > + eshell=3D$(user_get_nologin) > > >=20 > > > Then this would have to become > > >=20 > > > eshell=3D$(userland_get_nologin "${USERLAND}") > >=20 > > Do you have any real use for that? > >=20 >=20 > No. It's a better design IMO since you can e.g. test the function by > passing it an argument rather than by setting a global variable (which > has other consequences). But no immediate application. >=20 I'm sorry but this makes no sense. The function already depends on ROOT variable, and on presence of specific files in the filesystem. I see no reason to make USERLAND special here. Furthermore, it's an internal function with no external application. It has two call sites, and in both we want the same value of USERLAND (which is defined by profiles) to apply. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-hHSOtHRVnrscxNQvWYjT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAl0CTS5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM3 NkE4NDUwOTQwOThEMjhDQzhCMjZDNTYzOUFEQUUyMzI5RTI0MEUACgkQY5ra4jKe JA7eowf/TeEb7LhV21sVClQSOIKSTLr7P50PQ8vc2aRuiVqDRxZ22HLAG1z7r6Rl 1d8eYXuiqq/iIunFcZvy1Uk/rQ3T7bXmcchbO22T2o4LOHqhXTLLc28YAKb2DzDH G6HC4wOQWn3WFTOZdBmTObRmzdoQ21TKxNCX59E1HDWBrKgGDHv/uXVCbe5cUk+s fSENTnH5xAFh6bVzq0aMfbmetPOoTNE2cXS+R7H/Dgq2lYVFfanqxiQqKMonK3Ek 218Em0F4V872B4UXbMoJFcq9mXLQLOgxi5pOLC1qAsOz8qvCIAJRRQrCDboY8Qcm GRP6H9aalX08jOk8+lKkcWxXLK8rMA== =PMsQ -----END PGP SIGNATURE----- --=-hHSOtHRVnrscxNQvWYjT--