GNU bug report logs -
#77487
1.4 million extraneous symlinks under .guix-home/profile/share/icons
Previous Next
Reported by: "Timo Wilken" <guix <at> twilken.net>
Date: Thu, 3 Apr 2025 12:07:01 UTC
Severity: normal
Found in version 1.4
Done: 宋文武 <iyzsong <at> envs.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 27 Apr 2025 10:40:22 +0800
with message-id <87v7qqjpih.fsf <at> envs.net>
and subject line Re: [bug#77251] [PATCH] guix: gtk-icon-themes: produce only cache in output
has caused the debbugs.gnu.org bug report #77487,
regarding 1.4 million extraneous symlinks under .guix-home/profile/share/icons
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
77487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77487
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
In my ~/.guix-home/profile/share/icons/, I have a total of 1.4 million
symlinks:
$ find ~/.guix-home/profile/share/icons/ -type l -printf x | wc -c
1425657
The directory itself is not a symlink. Instead, it contains the following
structure (with the papirus-icon-theme package installed):
~/.guix-home/profile/share/icons/
+ Papirus/
+ icon-theme.cache -> /gnu/store/...-gtk-icon-themes/share/icons/Papirus/icon-theme.cache
+ index.theme -> /gnu/store/...-gtk-icon-themes/share/icons/Papirus/index.theme
+ 16x16/
+ apps/
+ 010editor.svg -> /gnu/store/...-gtk-icon-themes/share/icons/Papirus/16x16/apps/010editor.svg
+ 09BE_EpicGamesLauncher.0.svg -> /gnu/store/...-gtk-icon-themes/share/icons/Papirus/16x16/apps/09BE_EpicGamesLauncher.0.svg
+ 0ad.svg -> /gnu/store/...-gtk-icon-themes/share/icons/Papirus/16x16/apps/0ad.svg
[and so on, and so forth...]
I.e., every single image file in every single icon theme is linked
individually -- none of the 16x16 (etc) directories are symlinks!
These files are also all symlinks to
/gnu/store/...-gtk-icon-themes/share/icons/<icon>, where <icon> is their own
filename under ~/.guix-homme/profile/share/icons/. There are no symlinks that
point anywhere else -- even the icon-theme.cache and index.theme symlinks
point into the same "gtk-icon-themes" union.
I've checked this using the following shell snippet:
$ cd ~/.guix-home/profile/share/icons
$ find */ -type l -printf '%p\t%l\n' | awk -F'\t' '{
gsub(/[^a-zA-Z0-9/_-]/, "[&]", $1) # escape symlink path as regex
sub("/" $1 "$", "", $2) # remove symlink path from the end of its target path
print $2 # print trimmed target path
}' | uniq -c
1433393 /gnu/store/zg7wwydwjaykpp0dwzq97hzilzd3q85f-gtk-icon-themes/share/icons
My question is therefore: why isn't ~/.guix-home/profile/share/icons itself a
symlink to /gnu/store/...-gtk-icon-themes/share/icons? That would get my home
profile down from 1,440,513 to a measly 14,857 symlinks in total -- and
presumably speed up the home profile creation by a lot (instead of taking over
a minute on a fast NVME SSD)!
I've tried digging into (guix build union) and (guix profiles), but I've not
found anything obviously wrong...
Cheers,
Timo
[Message part 3 (message/rfc822, inline)]
Rutherther <rutherther <at> ditigal.xyz> writes:
> This patch changes the behavior of gtk-icon-themes to produce only the
> icon-theme.cache cache files, instead of producing the whole union.
> The reason for this is that by producing the whole union, the icons are put to
> the profile twice. This throws off the union build of the profile and symlinks
> all the individual files instead of symlinking folders. This means
> unnecessarily high numbers of symlinks are produced.
>
> * guix/profiles.scm (gtk-icon-themes): Produce only caches
Pushed to master as commit 32575294, with simplified commit message.
Thank you!
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.