GNU bug report logs - #77487
1.4 million extraneous symlinks under .guix-home/profile/share/icons

Previous Next

Package: guix;

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

From: "Timo Wilken" <guix <at> twilken.net>
To: 77487 <at> debbugs.gnu.org
Subject: bug#77487: 1.4 million extraneous symlinks under .guix-home/profile/share/icons
Date: Thu, 03 Apr 2025 14:05:40 +0200
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




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.