Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 428472 - gentoolkit should remember old versions of libraries for revdep-rebuild
Summary: gentoolkit should remember old versions of libraries for revdep-rebuild
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-28 22:16 UTC by Honza
Modified: 2013-01-15 22:09 UTC (History)
0 users

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 Honza 2012-07-28 22:16:16 UTC
I know that I can get list of all old versions of libraries from those "In order to avoid breaking packages that depend on these old libs, the libraries are not being removed." messages by grepping through /var/log/portage/elog/summary, but wouldn't be simpler if this list would be stored somewhere and then revdep-rebuild with some new parameter would automatically used this list (after removing libraries which were already deleted of course)?

Reproducible: Always

Steps to Reproduce:
1. emerge several libraries with new soname correctly preserving old versions
2. try to get all of those on one revdep-rebuild line

Actual Results:  
Is hard, not speaking about the need of making the regular expression.

Expected Results:  
Could be one flag.
Comment 1 Zoltán Halassy 2013-01-15 09:32:05 UTC
Either a managed list, or moving library files from their original place to eg. /usr/oldlib or something like that, and include the dir in LDPATH. The binaries do not hardcode the path of used libs anyway (but tell me if i'm wrong).

In the second case no need to touch revdep-rebuild much, just ignore the oldlib while searching for missing libs.
Comment 2 Zac Medico gentoo-dev 2013-01-15 11:58:26 UTC
(In reply to comment #1)
> Either a managed list, or moving library files from their original place to
> eg. /usr/oldlib or something like that, and include the dir in LDPATH. The
> binaries do not hardcode the path of used libs anyway (but tell me if i'm
> wrong).

This is essentially the same as FEATURES=preserve-libs (see `man make.conf`).
Comment 3 Zoltán Halassy 2013-01-15 12:08:35 UTC
(In reply to comment #2)
> This is essentially the same as FEATURES=preserve-libs (see `man make.conf`).

Uh, no? (or do I interpret it wrong) "Preserve libraries when the sonames change during upgrade or downgrade.  Libraries are preserved only if consumers of those libraries are detected."

The idea is quite the opposite. I would like to get rid of the still-used-but-obsolete libraries (but not bluntly deleting them, rather AFTER we recompiled the packages, so really nothing is using it).

We are talking about this could be somehwat automated, as getting rid of old libraries happens manually at the moment.

 * Old versions of installed libraries were detected on your system.
 * In order to avoid breaking packages that depend on these old libs,
 * the libraries are not being removed.  You need to run revdep-rebuild
 * in order to remove these old dependencies.  If you do not have this
 * helper program, simply emerge the 'gentoolkit' package.
 *
 *   # revdep-rebuild --library 'foo' && rm 'foo'

Here, library foo could be gathered into a list, which could be processed later.
Comment 4 Zac Medico gentoo-dev 2013-01-15 12:18:02 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This is essentially the same as FEATURES=preserve-libs (see `man make.conf`).
> 
> Uh, no? (or do I interpret it wrong) "Preserve libraries when the sonames
> change during upgrade or downgrade.  Libraries are preserved only if
> consumers of those libraries are detected."

If I understand you correctly, your request is identical to preserve-libs.

> The idea is quite the opposite. I would like to get rid of the
> still-used-but-obsolete libraries (but not bluntly deleting them, rather
> AFTER we recompiled the packages, so really nothing is using it).

With preserve-libs, the still-used-but-obsolete libraries are automatically removed after you run `emerge @preserved-rebuild`.
Comment 5 Zoltán Halassy 2013-01-15 12:32:39 UTC
Oh, then I was underinformed, and I didn't know what to search for. Then found your blog entry about this topic

http://blogs.gentoo.org/zmedico/2012/09/21/preserve-libs-available-in-portage-2-1/

but I didn't find anything in man files about "emerge @preserved-rebuild" .

Anyway, thank you for pointing this out for me (or us)!
Comment 6 Zac Medico gentoo-dev 2013-01-15 21:45:58 UTC
(In reply to comment #5)
Thanks, I've updated the man page:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=cb49dfc3319a0a202fb26f3cf825cf12790d2bd3
Comment 7 Paul Varner (RETIRED) gentoo-dev 2013-01-15 22:00:31 UTC
From a gentoolkit perspective, since subslots in EAPI 5 and FEATURES=preserve-libs will eventually deprecate the need for revdep-rebuild in everyday use, we will not be adding this feature to revdep-rebuild.

Zac, feel free to close this bug once the portage changes are released.
Comment 8 Zac Medico gentoo-dev 2013-01-15 22:09:55 UTC
I don't want to hijack this bug, so please just file a new bug for sys-apps/portage if there's anything needed for preserve-libs (bug 240323 tracks preserve-libs issues).