Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777111 - sys-apps/portage: score binary packages by difference between built USE configuration and desired USE configuration as alternative to --binpkg-respect-use
Summary: sys-apps/portage: score binary packages by difference between built USE confi...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: .tbz2 support (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2021-03-18 20:18 UTC by Zac Medico
Modified: 2021-08-22 17:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2021-03-18 20:18:38 UTC
When selecting binary packages, there are cases where --binpkg-respect-use may be too strict, and it would be helpful to be able to select packages which minimize differences between built USE configuration and desired USE configuration. We can use difflib to implement this, in the same way as emerge --search uses it to implement fuzzy search.
Comment 1 Emily Rowlands 2021-03-18 20:39:35 UTC
If this were implemented, there should be a way of specifying the "importance" of a USE flag so that an important difference isn't overlooked for a minor one. For example in sys-apps/glibc, USE=headers-only has a much greater impact on the resulting package than the doc flag. Another point would be having ABI-changing flags have a very high score. Unfortunately, my suggestion here may require a future EAPI change or an additional attribute in the <use> element in metadata.xml since it is not feasible to hard-code that kind of information into portage itself.
Comment 2 Zac Medico gentoo-dev 2021-03-18 21:38:18 UTC
We can allow users to side-load ranks so that they can be used without any EAPI support.
Comment 3 Zac Medico gentoo-dev 2021-03-18 21:43:30 UTC
(In reply to Emily Rowlands from comment #1)
> If this were implemented, there should be a way of specifying the
> "importance" of a USE flag so that an important difference isn't overlooked
> for a minor one.

I suppose we should also allow this rank to have different values per package/USE flag combination.