all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#31458] [PATCH] union: Do not warn about harmless collissions.
@ 2018-05-15  8:31 Ludovic Courtès
  2018-05-15 12:29 ` Danny Milosavljevic
  2018-05-15 12:43 ` [bug#31458] " Danny Milosavljevic
  0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-05-15  8:31 UTC (permalink / raw)
  To: 31458

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#31458] [PATCH] union: Do not warn about harmless collissions.
  2018-05-15  8:31 [bug#31458] [PATCH] union: Do not warn about harmless collissions Ludovic Courtès
@ 2018-05-15 12:29 ` Danny Milosavljevic
  2018-05-16  8:57   ` Ludovic Courtès
  2018-05-15 12:43 ` [bug#31458] " Danny Milosavljevic
  1 sibling, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2018-05-15 12:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31458

[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]

Hi Ludo,

On Tue, 15 May 2018 10:31:19 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

> 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

Hmm, I guess the icon-theme.cache one is harmless enough - however, there shouldn't
be many of those left anyway.  Is there an easy way to check the store of hydra or something
which packages still have those files?

I've fixed inkscape now.

> +(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"))

However, about gschemas.compiled I'm not sure yet.

How do we ensure that glib-or-gtk-build-system is actually used for packages that
need it?

libreoffice has some problem that makes it crash every time it tries to open a
file dialog - I wonder if that's related (libreoffice uses gnu-build-system).

But glib-or-gtk-build-system expicitly generates gschemas.compiled, ensuring a
collision - what's up with that?

Shouldn't there be a profile hook for it instead?  There doesn't seem to be one.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31458] [PATCH] union: Do not warn about harmless collissions.
  2018-05-15  8:31 [bug#31458] [PATCH] union: Do not warn about harmless collissions Ludovic Courtès
  2018-05-15 12:29 ` Danny Milosavljevic
@ 2018-05-15 12:43 ` Danny Milosavljevic
  1 sibling, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2018-05-15 12:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31458

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

>Re: [bug#31458] [PATCH] union: Do not warn about harmless collissions.
typo ------------------------------------------------------------^


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31458] [PATCH] union: Do not warn about harmless collissions.
  2018-05-15 12:29 ` Danny Milosavljevic
@ 2018-05-16  8:57   ` Ludovic Courtès
  2018-05-16 11:07     ` Danny Milosavljevic
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-05-16  8:57 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 31458

Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Tue, 15 May 2018 10:31:19 +0200
> Ludovic Courtès <ludo@gnu.org> wrote:
>
>> 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
>
> Hmm, I guess the icon-theme.cache one is harmless enough - however, there shouldn't
> be many of those left anyway.  Is there an easy way to check the store of hydra or something
> which packages still have those files?

No, but everyone can check in their own profile.  :-)

> I've fixed inkscape now.

Since “fixing” packages like you just did is a manual step, I think it’s
still fine to ignore “icon-theme.cache” collisions.  WDYT?

>> +(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"))
>
> However, about gschemas.compiled I'm not sure yet.
>
> How do we ensure that glib-or-gtk-build-system is actually used for packages that
> need it?

I don’t think we can.  :-/

> libreoffice has some problem that makes it crash every time it tries to open a
> file dialog - I wonder if that's related (libreoffice uses gnu-build-system).

It is, see <https://bugs.gnu.org/30642>.

> But glib-or-gtk-build-system expicitly generates gschemas.compiled, ensuring a
> collision - what's up with that?

glib-or-gtk-build-system wraps binaries so that they refer to the right
gschemas.compiled, so in that case the gschemas.compiled file that ends
up in the profile doesn’t matter at all.

> 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?).

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.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#31458] [PATCH] union: Do not warn about harmless collissions.
  2018-05-16  8:57   ` Ludovic Courtès
@ 2018-05-16 11:07     ` Danny Milosavljevic
  2018-05-17  8:50       ` bug#31458: " Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Milosavljevic @ 2018-05-16 11:07 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 31458

[-- Attachment #1: Type: text/plain, Size: 1993 bytes --]

Hi Ludo,

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

> Since “fixing” packages like you just did is a manual step, I think it’s
> still fine to ignore “icon-theme.cache” collisions.  WDYT?

Definitely.

> > However, about gschemas.compiled I'm not sure yet.
> >
> > How do we ensure that glib-or-gtk-build-system is actually used for packages that
> > need it?  
> 
> I don’t think we can.  :-/
> 
> > libreoffice has some problem that makes it crash every time it tries to open a
> > file dialog - I wonder if that's related (libreoffice uses gnu-build-system).  
> 
> It is, see <https://bugs.gnu.org/30642>.
> 
> > But glib-or-gtk-build-system expicitly generates gschemas.compiled, ensuring a
> > collision - what's up with that?  
> 
> glib-or-gtk-build-system wraps binaries so that they refer to the right
> gschemas.compiled, so in that case the gschemas.compiled file that ends
> up in the profile doesn’t matter at all.
> 
> > 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)

> 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)

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

LGTM!

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#31458: [PATCH] union: Do not warn about harmless collissions.
  2018-05-16 11:07     ` Danny Milosavljevic
@ 2018-05-17  8:50       ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-05-17  8:50 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 31458-done

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Wed, 16 May 2018 10:57:57 +0200
> ludo@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’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-17  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15  8:31 [bug#31458] [PATCH] union: Do not warn about harmless collissions Ludovic Courtès
2018-05-15 12:29 ` Danny Milosavljevic
2018-05-16  8:57   ` Ludovic Courtès
2018-05-16 11:07     ` Danny Milosavljevic
2018-05-17  8:50       ` bug#31458: " Ludovic Courtès
2018-05-15 12:43 ` [bug#31458] " Danny Milosavljevic

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.