GNU bug report logs -
#77251
[PATCH] guix: gtk-icon-themes: produce only cache in output
Previous Next
To reply to this bug, email your comments to 77251 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
:
bug#77251
; Package
guix-patches
.
(Tue, 25 Mar 2025 14:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rutherther <rutherther <at> ditigal.xyz>
:
New bug report received and forwarded. Copy sent to
guix <at> cbaines.net, dev <at> jpoiret.xyz, ludo <at> gnu.org, othacehe <at> gnu.org, zimon.toutoune <at> gmail.com, me <at> tobias.gr, guix-patches <at> gnu.org
.
(Tue, 25 Mar 2025 14:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Change-Id: Ia452565768753b8a60baf4fc075f6fe5ebb4fa39
---
guix/profiles.scm | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index fb4dbc5bd0..2dda574e03 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1382,23 +1382,32 @@ (define* (gtk-icon-themes manifest #:optional system)
(let* ((destdir (string-append #$output "/share/icons"))
(icondirs (filter file-exists?
(map (cut string-append <> "/share/icons")
- '#$(manifest-inputs manifest)))))
+ '#$(manifest-inputs manifest))))
+ (cache-file-name "icon-theme.cache")
+ (scratchdir (string-append (getcwd) "/icons")))
+
+ (mkdir-p destdir)
;; Union all the icons.
- (mkdir-p (string-append #$output "/share"))
- (union-build destdir icondirs
+ (union-build scratchdir icondirs
#:log-port (%make-void-port "w"))
;; Update the 'icon-theme.cache' file for each icon theme.
(for-each
(lambda (theme)
- (let ((dir (string-append destdir "/" theme)))
- ;; Occasionally DESTDIR contains plain files, such as
+ (let* ((dir (string-append scratchdir "/" theme))
+ (cache-file (string-append dir "/" cache-file-name)))
+ ;; Occasionally SCRATCHDIR contains plain files, such as
;; "abiword_48.png". Ignore these.
(when (file-is-directory? dir)
(ensure-writable-directory dir)
- (system* #+gtk-update-icon-cache "-t" dir "--quiet"))))
- (scandir destdir (negate (cut member <> '("." "..")))))))))
+ (system* #+gtk-update-icon-cache "-t" dir "--quiet")
+ (when (file-exists? cache-file)
+ (mkdir-p (string-append destdir "/" theme))
+ (copy-file
+ cache-file
+ (string-append destdir "/" theme "/" cache-file-name))))))
+ (scandir scratchdir (negate (cut member <> '("." "..")))))))))
;; Don't run the hook when there's nothing to do.
(if %gtk+
base-commit: fbfd2b93831978aadbb96f32cafdab997b04c6c6
--
2.49.0
This bug report was last modified 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.