> On 2018-08-16, at 16:09, Corentin “Nado” Pazdera <n...@troglodyte.be> wrote:
>
> Hi,
>
> So I tested it, and I was surprised how many /etc files weren't put into
> whitelist.
> Actually, most of /etc shouldn't be suggested for deletion if the packages
> are still installed.
Thanks for testing! Really appreciate it.
The whitelist is the biggest work in progress right now. Most of what it lists
from /etc for me is /etc/config-archive which AFAIK is not managed by Portage
at all although Portage will place old files there? I don't use the feature
because my /etc is controlled by Git. The stuff listed in /var/ is pretty
accurate as there's a lot of old website cruft and this computer does not serve
anything like that anymore.
>
> Portage stuff like repositories could be whitelisted in a dynamic manner, or
> at least bing able to
> tell what directorie(s) are used to store them.
The idea is to move to everything in the whitelist.c file to a declarative (no
code unless you count RE) configuration file. I have not decided on a format
but I am leaning towards INI-style because GLib2 has a parser for that
built-in. The config file will specify exact paths, RE, and globs. There will
be a default dynamic list generated at runtime based on what packages you have
installed (as gcruft had this feature).
> I also caught some wrongly listed files because of the multilib system with
> /lib symlink.
> For example, dhcpcd declared /lib/dhcpcd/dhcpcd-hooks, thus the realpath
> /lib64/dhcpcd/dhcpcd-hooks
> was listed in the removal suggestion. This should be fixed with profile 17.1
The /lib vs /lib64 issue will be resolved in a later version. I think I need to
use lstat() everywhere instead of stat(), or I can call realpath() prior to
storing values in the set. This file should be whitelisted, but only if you
have dhcpcd installed (I've long since moved to dhcpd).
I am trying to my best to give zero false positives, so you plan to have
something like `% gcrud | ... | xargs rm -fR`.
>
> The log is so huge at the moment it is useless for me :/
>
> % wc -l out.log
> 461575 out.log
Any thoughts on how to simplify analysis?
--
Andrew