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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D631615815E for ; Thu, 1 Feb 2024 21:04:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A36DAE2A3A; Thu, 1 Feb 2024 21:04:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5C14BE2A13 for ; Thu, 1 Feb 2024 21:04:02 +0000 (UTC) Message-ID: <9cd24274a8502f92e20fff640c19a63560bfdc4c.camel@gentoo.org> Subject: Re: [gentoo-dev] RFC: Block ebuilds installing tests to ${D} by default From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Thu, 01 Feb 2024 22:03:57 +0100 In-Reply-To: References: Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-WjaLFwTG5KLpndHALwg4" User-Agent: Evolution 3.50.3 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: db7025a1-3654-4fe0-9fa9-d4c349c465e4 X-Archives-Hash: 5444ef571773e12ace71d5c5b30d7b77 --=-WjaLFwTG5KLpndHALwg4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2024-02-01 at 08:15 +0000, Robin H. Johnson wrote: > TL;DR: > I'd like to propose a change where packages should NOT install their > tests to ${D} by default. That sounds like reverting a lot of effort that has been cleaned up all over the past years. > Such an install may optionally enabled with > USE=3Dtest, which should be decoupled from FEATURES=3Dtest. This would prevent us from detecting files accidentally left over by FEATURES=3Dtest, as ago does right now. A few times this was actually helpful in identifying packages whose test suites wrote temporary files into site-packages directory, and they effectively ended up being installed. > Or depending on > the color of the bikeshed, we add something new like USE=3Dinstall-tests. >=20 > Background: > Python packages install a number of _test.py files, and related .pyc > files. The files are generally useful for running tests after the > package is installed, and may have additional testing dependencies that > are not installed via RDEPEND. This is not really relevant. This is the case of optional runtime dependencies (i.e. you don't have to have them installed when installing the test suite in question), and per policy PG-0001 these can be expressed using postinst messages or likewise. > As an example, on the livegui install media, these files take 100MB+ > before squashfs compression. >=20 > Some users MAY wish to verify that a package continues to function > correctly, and they should have the USE=3Dtest dependencies available at > runtime, and the tests installed. >=20 > Such post-install testing may also require other files to be present, to > configure the test suite runs. I suppose you are referring to dev-lang/python here. Unfortunately, removing tests from it is a non-trivial problem. As I've mentioned to you before, there are packages that actually import modules form the test directory. Remember that Gentoo has a policy of following upstream, and this policy is specifically targeted towards developers who expect Gentoo to be a good baseline environment for developing packages. By explicitly diverging from upstream default install by default, we are effectively creating an incompatible Python environment and requiring users to go through extra steps to restore upstream compatibility. What's worse, Python development is often done via virtual environments. For regular Python packages, all kinds of Gentoo divergence can be easily "reverted" by installing the upstream packages inside the virtual environment. However, this isn't the case for dev-lang/python itself -- by stripping it down we're effectively creating virtual environments that are not fully functional and whose functionality cannot be restored without actually rebuilding dev-lang/python. On top of that, as you are also perfectly aware, stripping down tests is often non-trivial and either requires complex patches (we are talking of modifying the build system not to install something), or ugly hacks (we are talking about having Python install and compile modules, and removing them afterwards). Finally, "requiring other files to be present" effectively means adding USE dependencies. This is going to be a lot of effort, considering that effectively developers would have to run without test suites installed to detect missing dependencies, and then rebuild dev-lang/python every time they are about to run tests in a package that actually requires these files. Overall, I don't believe you've provided sufficient rationale to justify diverging from upstream, adding significant complexity to ebuilds and adding a lot of additional work to package maintainers who will be responsible for ensuring the correctness of package installations and USE dependencies. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-WjaLFwTG5KLpndHALwg4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmW8Bz0SHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOUC4H/3hjghyabfkHkttQVMCunbjV4UWpFPxM SKudqzH4s9ZZucM64j6dzy0+k4pjwqhhTvzLWl6kNbqch/hmiKWiq6l+zH4B8ysV o30vLmyMg2zSY9SqySKUvJ2dFu9dhewOmRfV6eWYA96k/UjWdbA2pKcLW8B7WEbw rLV4sKV+eShSujRA7dAfkMHQaNEHSnFEO6buAnutC7h7V0eN9BLuFEx0MNI232rP tHATlckA4o5mo/gTaxbInDZyebwNXv9jmU/clzMoMYCISgKul+NEBSiPUFsmQZPS tp4JqHw/aNkgUZSIifjccA+yoe5nJmTmrpiWfjgXMems6XD9Cr8s0FY= =FfbL -----END PGP SIGNATURE----- --=-WjaLFwTG5KLpndHALwg4--