Skip to content

eclean-pkg: clean binpkgs with stale IUSE and add --unreachable#66

Merged
gentoo-bot merged 3 commits into
gentoo:masterfrom
mattst88:eclean-changed-iuse-unreachable
Jul 23, 2026
Merged

eclean-pkg: clean binpkgs with stale IUSE and add --unreachable#66
gentoo-bot merged 3 commits into
gentoo:masterfrom
mattst88:eclean-changed-iuse-unreachable

Conversation

@mattst88

Copy link
Copy Markdown
Contributor

Two related additions to eclean-pkg for cleaning binary packages that Portage can no longer reuse.

--changed-iuse (bug 965888)

When PYTHON_COMPAT gains a new target, ebuilds grow a new default-disabled IUSE flag (e.g. python_targets_python3_14). Existing binpkgs lack that flag, so Portage refuses to install them with no way to make them usable again — they only ever get rebuilt from source. --changed-iuse deletes such orphaned binpkgs. The comparison ignores USE flag defaults (leading +/-) and only checks whether the set of flags matches the ebuild's IUSE.

--unreachable (bug 977235)

The set of --changed-* reasons keeps growing and users generally want them all. --unreachable enables every --changed-* option at once, so new reasons are picked up automatically without learning each flag.

Also documents the previously-undocumented --changed-deps / --changed-subslot options in the man page.

Closes: https://bugs.gentoo.org/965888
Closes: https://bugs.gentoo.org/977235

@mattst88

Copy link
Copy Markdown
Contributor Author

cc: @eli-schwartz

@eli-schwartz eli-schwartz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very nice.

Comment thread man/eclean.1
.TP
\fB\-\-changed\-subslot\fP delete packages with := deps on subslots no longer in the tree
.TP
\fB\-\-changed\-iuse\fP delete packages whose IUSE no longer matches the ebuild

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These retroactively added descriptions were probably supposed to be a third commit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They certainly can be, if you prefer.

@mattst88
mattst88 force-pushed the eclean-changed-iuse-unreachable branch from 3f70235 to fa9ef91 Compare July 23, 2026 03:13
mattst88 added 3 commits July 23, 2026 11:49
Signed-off-by: Matt Turner <mattst88@gentoo.org>
When PYTHON_COMPAT gains a new target, ebuilds grow a new
default-disabled IUSE flag (e.g. python_targets_python3_14). Existing
binary packages lack that flag, so Portage refuses to install them and
there is no way to make them usable again -- they are orphaned and will
only ever be rebuilt from source. Add --changed-iuse to delete such
binpkgs.

The comparison ignores USE flag defaults and only considers whether the
set of flags matches the current ebuild's IUSE.

Closes: https://bugs.gentoo.org/965888
Signed-off-by: Matt Turner <mattst88@gentoo.org>
The set of reasons a binary package can no longer be a Portage cache hit
keeps growing (--changed-deps, --changed-subslot, --changed-iuse), and
users generally just want all of them cleaned. Add --unreachable as a
convenience that enables every --changed-* option at once, so new
reasons are picked up automatically without users having to learn each
flag.

Closes: https://bugs.gentoo.org/977235
Signed-off-by: Matt Turner <mattst88@gentoo.org>
@mattst88
mattst88 force-pushed the eclean-changed-iuse-unreachable branch from fa9ef91 to 0670482 Compare July 23, 2026 15:49
@gentoo-bot
gentoo-bot merged commit 0670482 into gentoo:master Jul 23, 2026
9 checks passed
@mattst88
mattst88 deleted the eclean-changed-iuse-unreachable branch July 23, 2026 15:50
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