mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
union: Do not warn about harmless collisions.
Until now we'd get pointless messages like: warning: collision encountered: /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache /gnu/store/…-inkscape-0.92.3/share/icons/hicolor/icon-theme.cache warning: choosing /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache * guix/build/union.scm (%harmless-collisions): New variable. (warn-about-collision): Honor it.
This commit is contained in:
parent
7376ba4cd4
commit
827c56515e
1 changed files with 13 additions and 4 deletions
|
@ -81,14 +81,23 @@ (define buf2 (make-bytevector len))
|
||||||
(or (eof-object? n1)
|
(or (eof-object? n1)
|
||||||
(loop))))))))))))))
|
(loop))))))))))))))
|
||||||
|
|
||||||
|
(define %harmless-collisions
|
||||||
|
;; This is a list of files that are known to collide, but for which emitting
|
||||||
|
;; a warning doesn't make sense. For example, "icon-theme.cache" is
|
||||||
|
;; regenerated by a profile hook which shadows the file provided by
|
||||||
|
;; individual packages, and "gschemas.compiled" is made available to
|
||||||
|
;; applications via 'glib-or-gtk-build-system'.
|
||||||
|
'("icon-theme.cache" "gschemas.compiled"))
|
||||||
|
|
||||||
(define (warn-about-collision files)
|
(define (warn-about-collision files)
|
||||||
"Handle the collision among FILES by emitting a warning and choosing the
|
"Handle the collision among FILES by emitting a warning and choosing the
|
||||||
first one of THEM."
|
first one of THEM."
|
||||||
|
(let ((file (first files)))
|
||||||
|
(unless (member (basename file) %harmless-collisions)
|
||||||
(format (current-error-port)
|
(format (current-error-port)
|
||||||
"~%warning: collision encountered:~%~{ ~a~%~}"
|
"~%warning: collision encountered:~%~{ ~a~%~}"
|
||||||
files)
|
files)
|
||||||
(let ((file (first files)))
|
(format (current-error-port) "warning: choosing ~a~%" file))
|
||||||
(format (current-error-port) "warning: choosing ~a~%" file)
|
|
||||||
file))
|
file))
|
||||||
|
|
||||||
(define* (union-build output inputs
|
(define* (union-build output inputs
|
||||||
|
|
Loading…
Reference in a new issue