Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286714 - preserve-libs should handle packages that are uninstalled rather than replaced
Summary: preserve-libs should handle packages that are uninstalled rather than replaced
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 319061 326411 (view as bug list)
Depends on: 290478
Blocks: preserve-libs 284458
  Show dependency tree
 
Reported: 2009-09-27 22:43 UTC by Zac Medico
Modified: 2011-05-18 06:02 UTC (History)
4 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 2009-09-27 22:43:31 UTC
In cases like bug 284458, in which lzma-utils needs to be uninstalled, it would be helpful to preserve liblzmadec.*. In this case the preserve-libs registry will reference a package which is no longer installed, and it will reference libraries which belong to a package that has been uninstalled. It should reference all preserved libraries in this same way, regardless of whether a replacement package in the same slot is installed.

We may also want to consider preserving the libraries in a "quarantine directory". This will make it easier to identify preserved libraries, in case the preserve-libs registry gets corrupted, or in case we implement a way to force exclusion of the "quarantine directory" from the ld.so path used in the ebuild environment. The "quarantine directory" will also be helpful for cases like binutils upgrades, where the original path of the preserved libraries is not in the ld.so path because those libraries are added to the path by symlinks created in /usr/$CHOST/lib/ by the binutils-config program.
Comment 1 Sebastian Luther (few) 2010-05-10 12:44:22 UTC
Currently the PreservedLibsRegistry class keeps a mapping between cp:slot and (cpv, counter, list of paths). Would you accept a patch that makes it track only paths and makes it not caring about packages at all?
Comment 2 Zac Medico gentoo-dev 2010-05-11 06:30:16 UTC
Yeah, that seems reasonable.
Comment 3 Sebastian Luther (few) 2010-05-11 12:44:21 UTC
Then no package would own any preserved lib, is that ok? If yes, do we want to remove the preserved libs from the CONTENTS of installed packages if we encounter an old preserved libs registry on disk?
Comment 4 Zac Medico gentoo-dev 2010-05-12 01:42:16 UTC
Maybe we can keep the existing format but change the way it's used. In the PreservedLibsRegistry.register(cpv, slot, counter, paths) method we can pass in the information about the original package that installed the libraries. And of course we won't record preserved libs in the CONTENTS of replacement packages anymore (they'll just be listed in the preserved_libs_registry for the original package).

If we do decide to change the preserved_libs_registry format then I'd suggest a plain text file with one library path listed per line.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-05-27 20:53:13 UTC
*** Bug 319061 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Luther (few) 2010-07-01 07:31:08 UTC
*** Bug 326411 has been marked as a duplicate of this bug. ***
Comment 7 Dennis Schridde 2010-07-01 08:06:32 UTC
Random idea: When uninstalling a package while preserving a library, can you "auto-install" a dummy package holding just that library? So uninstallation would look something like:
<<< app-misc/coolpackage-1.2.3:0
>>> app-misc/coolpackage-1.2.3:preserved
That way you can do the library/package reference without any extra database.
Comment 8 Zac Medico gentoo-dev 2011-05-14 08:52:39 UTC
This is fixed in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c64d4abee145d083c70273be8fd23bd56dffe7ec

Now the emerge --depclean-lib-check option (bug 230053) will now be ignored when FEATURES=preserve-libs is enabled, since any libraries that have consumers will simply be preserved.
Comment 9 Zac Medico gentoo-dev 2011-05-14 08:55:05 UTC
(In reply to comment #7)
> Random idea: When uninstalling a package while preserving a library, can you
> "auto-install" a dummy package holding just that library? So uninstallation
> would look something like:
> <<< app-misc/coolpackage-1.2.3:0
> >>> app-misc/coolpackage-1.2.3:preserved
> That way you can do the library/package reference without any extra database.

We can't use the same database since we don't want has_version calls to return misleading results. Use `portageq list_preserved_libs /` if you want to query the preserved libs.
Comment 11 Zac Medico gentoo-dev 2011-05-18 06:02:56 UTC
This is fixed in 2.2.0_alpha34.