On Wed, May 04, 2022 at 07:45:32AM -0400, Raul Miller wrote:
> On Wed, May 4, 2022 at 4:15 AM Sebastien Marie <sema...@online.fr> wrote:
> > The main problem I am seeing would be maintaining such lists, and it 
> > necessary
> > means manual addition to add only "safe" files to remove (no libraries at
> > least).
> 
> Conceptually speaking, it's possible to track library dependencies,
> and it's possible to build tools for doing so, and it's possible to
> automate this. ldd already does a lot of the work here, and a
> conceptual sysclean replacement might provide toolchain and/or install
> time and/or backup time support for tracking executable locations.
> (Conceptually, this kind of tracking would use some directory
> structure to support independent updates, and would itself be subject
> to [careful] cleanup. Some small redundancy here would probably be
> fine.)

It is not that simple.

Ports has such a tool for library tracking and automatic generation of
WANTLIB.

There are lots of caveats
- it's slow,
- taking care of library paths is complicated,
- taking care of library paths is ambiguous,
- some modern software prefer dlopen.

(We have a handful of ports that have WANTLIB that are not statically detected.
Some modern stuff in qt and gnome land will tend to dlopen some specific
components like database drivers and crypto libraries, in order to be able
to use it if it's installed or not if it's not.

I *think*, from what Antoine told me, that there's even a generic framework
somewhere in gnome that tries to use this all the time instead of classic
dynamic linking).

That said, I value the information sysclean gives me... but then I clean
my system manually regularly, and most often I know exactly what I'm getting
rid of.  All the horrors stories I've seen in this discussion are related
to people trusting it blindly/automatically.

Reply via email to