Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565792 - sys-apps/portage: apply PROVIDES_EXCLUDE and REQUIRES_EXCLUDE to preserve-libs logic
Summary: sys-apps/portage: apply PROVIDES_EXCLUDE and REQUIRES_EXCLUDE to preserve-li...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: preserve-libs vmware-preserved
  Show dependency tree
 
Reported: 2015-11-14 23:50 UTC by Zac Medico
Modified: 2022-10-20 02:44 UTC (History)
1 user (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 2015-11-14 23:50:27 UTC
The PROVIDES_EXCLUDE and REQUIRES_EXCLUDE variables currently only apply to soname dependencies. However, it would be useful if we also applied them to preserve-libs logic.
Comment 1 Zac Medico gentoo-dev 2015-11-15 05:42:46 UTC
Since REQUIRES and PROVIDES metadata are already filtered with the corresponding _EXCLUDE variables, we can simply filter NEEDED.ELF.2 data by intersection with REQUIRES or PROVIDES where appropriate.
Comment 2 Zac Medico gentoo-dev 2015-11-15 09:08:42 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_565792

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/751007648406097e3228f25d2d680ddf
Comment 3 Zac Medico gentoo-dev 2015-11-16 18:05:38 UTC
(In reply to Zac Medico from comment #2)
> There's a patch in the following branch:
> 
> https://github.com/zmedico/portage/tree/bug_565792


I've just realized that intersection with REQUIRES is flawed, because REQUIRES automatically excludes all sonames that are in PROVIDES. So, as is, the patch will prevent LinkageMapELF from accounting for soname dependencies between files from the same package. The result would be that a library could get preserved without also preserving other libraries that said library requires from the same package.

So, I'll have to re-write the patch to use REQUIRES_EXCLUDE and PROVIDES_EXCLUDE directly.
Comment 4 Zac Medico gentoo-dev 2015-11-17 17:30:30 UTC
(In reply to Zac Medico from comment #3)
> So, I'll have to re-write the patch to use REQUIRES_EXCLUDE and
> PROVIDES_EXCLUDE directly.

Actually, it looks like we can still use REQUIRES and PROVIDES to simplify things. The key is to intersect with REQUIRES and PROVIDES only when evaluating relationships between files originating from separate packages. When evaluating relationships between files originating from the same package, REQUIRES and PROVIDES should simply not be used (which is the current status quo), since they do not account for the relationships which exist between files originating from the same package.