Subject: bug#35701: guix size should account for hard links in its disk space calculation

From: Ludovic Courtès <[email-masked]>
Date: Tue, 14 May 2019 10:17:59 +0200

Salut Maxim,

Maxim Cournoyer <[email-masked]> skribis:

> Conclusion: the size of grafts is added multiple times even though they
> should be very light on disk usage given that they are mostly hard links
> to the original, ungrafted output.

I think there should be an option to take hard links into account, but
it should probably not be done by default.  There are cases (e.g., when
using ‘guix pack’ or when evaluating the amount of data that will
actually be transferred over the wire) where you want to know the
“apparent size”, ignoring hard links.

Note that it’s a bit more work to take hard links into account since
currently ‘guix size’ just queries each store item’s size to the
daemon.

Thanks,
Ludo’.