|Summary:||sys-apps/portage: apply PROVIDES_EXCLUDE and REQUIRES_EXCLUDE to preserve-libs logic|
|Product:||Portage Development||Reporter:||Zac Medico <zmedico>|
|Component:||Core - Dependencies||Assignee:||Portage team <dev-portage>|
|Package list:||Runtime testing required:||---|
|Bug Depends on:|
|Bug Blocks:||240323, 493018|
Description Zac Medico 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 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 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 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 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.