GNU bug report logs - #31458
[PATCH] union: Do not warn about harmless collissions.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 15 May 2018 08:33:01 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#31458: closed (Re: [bug#31458] [PATCH] union: Do not warn
 about harmless collissions.)
Date: Thu, 17 May 2018 08:51:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#31458: [PATCH] union: Do not warn about harmless collissions.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 31458 <at> debbugs.gnu.org.

-- 
31458: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31458
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 31458-done <at> debbugs.gnu.org
Subject: Re: [bug#31458] [PATCH] union: Do not warn about harmless collissions.
Date: Thu, 17 May 2018 10:50:45 +0200
Hi Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Wed, 16 May 2018 10:57:57 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:

[...]

>> > Shouldn't there be a profile hook for it instead?  There doesn't seem to be one.  
>> 
>> Maybe, yes, though I’m not sure how that’d work (and would it be fast
>> enough?).
>
> I wrote one in bug 31462.  Seems to be quite fast.  But let's think about whether
> we want it, and whether we want it in addition to the wrapper.
>
> (libreoffice works with it now FWIW)

Awesome!

>> This seems to be orthogonal to this patch, though: we can remove the
>> collision warnings for these files today, because there’s nothing users
>> can do about them and they’re effectively harmless, and later on, if we
>> have better gschemas.compiled handling, we can always let them through
>> again.
>
> Yeah, I just wanted to make sure we are not hiding them if they are the only
> indication that something will break horribly with the program.
> (see libreoffice)

Sure, that makes sense.  In this particular case the gschemas.compiled
collision did not tell us much: some applications (e.g., Evince) would
work fine because they used glib-or-gtk-build-system, while others
(e.g., LibreOffice) would fail.

> But since the wrapper needs gschemas.compiled, we can't use it as indicator
> for missing-glib-or-gtk-build-system anyway, so:
>
> LGTM!

Alright, committed!  :-)

Thank you,
Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH] union: Do not warn about harmless collissions.
Date: Tue, 15 May 2018 10:31:19 +0200
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.
---
 guix/build/union.scm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/guix/build/union.scm b/guix/build/union.scm
index 24b366af4..fff795c4d 100644
--- a/guix/build/union.scm
+++ b/guix/build/union.scm
@@ -81,14 +81,23 @@ identical, #f otherwise."
                                    (or (eof-object? n1)
                                        (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)
   "Handle the collision among FILES by emitting a warning and choosing the
 first one of THEM."
-  (format (current-error-port)
-          "~%warning: collision encountered:~%~{  ~a~%~}"
-          files)
   (let ((file (first files)))
-    (format (current-error-port) "warning: choosing ~a~%" file)
+    (unless (member (basename file) %harmless-collisions)
+      (format (current-error-port)
+              "~%warning: collision encountered:~%~{  ~a~%~}"
+              files)
+      (format (current-error-port) "warning: choosing ~a~%" file))
     file))
 
 (define* (union-build output inputs
-- 
2.17.0




This bug report was last modified 7 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.