Skip to content

Implement FEATURE suppress-bindist-buildpkg#1440

Open
Kangie wants to merge 2 commits intogentoo:masterfrom
Kangie:restrict-bindist-binpkg
Open

Implement FEATURE suppress-bindist-buildpkg#1440
Kangie wants to merge 2 commits intogentoo:masterfrom
Kangie:restrict-bindist-binpkg

Conversation

@Kangie
Copy link

@Kangie Kangie commented May 31, 2025

This feature combines with buildpkg to enable the installation of packages with "RESTRICT=bindist" without the creation of a binpkg.

This should help binhost builders improve the library of pre-packaged software without running the risk of accidentally (bin)packaging a dependency that we can't legally distribute (or don't want to pay royalties on!)

Current Behaviour:
FEATURES=buildpkg + RESTRICT=bindist
=> Package is installed, binpkg created
FEATURES=buildpkg + RESTRICT=bindist + ACCEPT_RESTRICT=-bindist
=> Package is masked, cannot be selected

New Behaviour:
FEATURES=buildpkg + RESTRICT=bindist
=> Package is installed, binpkg created
FEATURES=buildpkg suppress-bindist-buildpkg + RESTRICT=bindist
=> Package is installed, binpkg creation stage skipped
FEATURES=* + RESTRICT=bindist + ACCEPT_RESTRICT=-bindist
=> Any combination of features and the above are masked

Bug: https://bugs.gentoo.org/542480

@Kangie Kangie force-pushed the restrict-bindist-binpkg branch from e1422ca to dcea5cc Compare May 31, 2025 23:22
@thesamesam thesamesam requested review from thesamesam and zmedico June 7, 2025 03:44
Kangie added 2 commits June 9, 2025 13:43
This feature combines with `buildpkg` to enable the installation of
packages with "RESTRICT=bindist" without the creation of a binpkg.

This should help binhost builders improve the library of pre-packaged
software without running the risk of accidentally (bin)packaging a dependency
that we can't legally distribute (or don't want to pay royalties on!)

Old Behaviour:
FEATURES=buildpkg + RESTRICT=bindist
	=> Package is installed, binpkg created
FEATURES=buildpkg + RESTRICT=bindist + ACCEPT_RESTRICT=-bindist
	=> Package is masked, cannot be selected

New Behaviour:
FEATURES=buildpkg + RESTRICT=bindist
	=> Package is installed, binpkg created
FEATURES=buildpkg suppress-bindist-buildpkg + RESTRICT=bindist
	=> Package is installed, binpkg creation stage skipped
FEATURES=* + RESTRICT=bindist + ACCEPT_RESTRICT=-bindist
	=> Any combination of features and the above are masked

Bug: https://bugs.gentoo.org/542480
Signed-off-by: Matt Jolly <kangie@gentoo.org>
3.9 has not been a valid python target in ::gentoo for a few years,
it's probably safe to start using python 3.10 features.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
@Kangie Kangie force-pushed the restrict-bindist-binpkg branch from dcea5cc to 22ae588 Compare June 9, 2025 04:30
description = 'Portage is the package management and distribution system for Gentoo'
readme = 'README.md'
requires-python = '>=3.9'
requires-python = '>=3.10'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your only reason to do this is that the Gentoo repository doesn't support it anymore then just don't do it?

I'm generally quite opposed to bumping versions just for the heck of it, without actually benefitting from doing so. No, dropping it from a CI matrix doesn't count.

Consider also, that dropping python versions means non-Gentoo entities who also use portage, may have their workflow broken. e.g. stable LTS system builders, who should at least be given the opportunity to use any non-EOL version. Also uhhhh the elephant in the room being Google, who have interesting perspectives on which version of Python to support. :)

If you can't even muster up a single code change to make as a result of dropping 3.9 support then it indicates your whole claim of dropping support is entirely hollow.

...

Also, please propose completely unrelated distinctive changes in different PRs, for better reviewability.

Copy link
Author

@Kangie Kangie Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, since you got here before I had a chance to comment:

I've bumped the minimum requirement to py3.10 as this change fails with py3.9 (I used match in a test), which wasn't picked up until CI runs because I don't develop against EoL'd (or almost EoL'd) Python.

It wouldn't be hard to rework the code to work with older python, but I also don't see much point in making such a change if we're not actually sure that we want py3.9 anyway. Since we're reviewing changes, I opted to drop the older version (which was privately discussed earlier as a possibility). I'm equally happy to just use if/else if we really want old python support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants