Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 766779

Summary: sys-apps/portage: preserve-libs should not re-parent preserved libraries
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: esigra, gentoo, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=652382
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240323    

Description Zac Medico gentoo-dev 2021-01-24 00:34:44 UTC
When a library is preserved during a package upgrade, preserve-libs currently re-parents the preserved libraries to the new version of the package. The re-parenting is not really desirable since /var/db/pkg transactions are needed in order to undo it when the preserved libraries are finally eliminated. These /var/db/pkg transcactions introduce extra complexity, such the NEEDED.ELF.2 handling added in this commit for bug 637284:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=0936d873aedccfb46ca4353c0b52f460287d6682

For cases like bug 652382 where there are dependency cycles between preserved libraries, it will be possible to eliminate the preserved libraries with zero /var/db/pkg transactions.

Since bug 286714, parent-less preserved libs are already implemented for unmerge operations. So, if we simply eliminate the re-parenting step during upgrades, then the corresponding preserved libraries will be handled in essentially the same ways as those preserved during unmerge operations.