Cleaning unused libraries and rebuilding dependent ones?
Mike Edenfield
kutulu at kutulu.org
Tue Feb 24 09:05:32 PST 2009
On 2/24/2009 9:06 AM, Bruce Simpson wrote:
> Hi all,
> [1] revdep-rebuild has very similar semantics to what I'm looking for,
> as it will navigate the dependency graph for all packages installed on
> the system, and rebuild packages where dependent libraries have changed.
> To do the same with portupgrade alone, I need to know which port(s)
> contain shared libraries, and tell it to go off and rebuild these
> *specific* packages if things change.
I don't think revdep-rebuild works as cleanly as you think.
Technically, revdep-rebuild only locates packages that are *already
broken* due to missing shared libraries, and rebuilds them.
What revdep-rebuild does is literally run ldd on every executable file
in the search path, grep for either "not found" or a specific library
name, then assign each broken binary to a package name for portage to
rebuild. This is exactly what libchk also does, so the effect would be
the same. Specifically, revdep-rebuild also won't pick up missing
dlopen() libs and such.
The semantics you're talking about sounds like the new @preserved-libs
set that's in the upcoming portage, but in order for that to work it has
to be maintained at the time of library update: as a shared lib is moved
into the compat folder, record any packages that depend on the
previously installed package into a set for later rebuilding.
--K
More information about the freebsd-stable
mailing list