[core-updates] : cycle detected in the references of ...gtk+-3.20.9-bin

Message ID 87oa2n7z1c.fsf@member.fsf.org
State New
Headers

Commit Message

=?utf-8?B?5a6L5paH5q2m?= Oct. 14, 2016, 3:03 p.m. UTC
  >> [...]
>> Move all the 3 desktop files into 'bin' output should work.  (I could
>> patch that next day, but won't be able to test it due to slow
>> substitute/download/build speed though.)
>
> That should work.  You can post the patch here so we can test, if you
> want.

Sure, here is it:
Please test it, Thanks!
  

Comments

John Darrington Oct. 14, 2016, 4:20 p.m. UTC | #1
On Fri, Oct 14, 2016 at 11:03:59PM +0800, ????????? wrote:
     
     >> [...]
     >> Move all the 3 desktop files into 'bin' output should work.  (I could
     >> patch that next day, but won't be able to test it due to slow
     >> substitute/download/build speed though.)
     >
     > That should work.  You can post the patch here so we can test, if you
     > want.
     
     Sure, here is it:

Where?
  
Leo Famulari Oct. 14, 2016, 6:15 p.m. UTC | #2
On Fri, Oct 14, 2016 at 11:03:59PM +0800, 宋文武 wrote:
> 
> >> [...]
> >> Move all the 3 desktop files into 'bin' output should work.  (I could
> >> patch that next day, but won't be able to test it due to slow
> >> substitute/download/build speed though.)
> >
> > That should work.  You can post the patch here so we can test, if you
> > want.
> 
> Sure, here is it:
> 

> From 4746292d8a672dbc3ea8d058baf6239974d92103 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Fri, 14 Oct 2016 22:57:53 +0800
> Subject: [PATCH] gnu: gtk+: Move desktop files into "bin" output.
> 
> * gnu/packages/gtk.scm (gtk+)[arguments]: Add 'move-desktop-files' phase.

Thanks, this works for me! With this patch, `guix system build` passed
the point where it previously failed.
  
=?utf-8?B?5a6L5paH5q2m?= Oct. 15, 2016, 3:56 a.m. UTC | #3
Leo Famulari <leo@famulari.name> writes:

> On Fri, Oct 14, 2016 at 11:03:59PM +0800, 宋文武 wrote:
>> 
>> >> [...]
>> >> Move all the 3 desktop files into 'bin' output should work.  (I could
>> >> patch that next day, but won't be able to test it due to slow
>> >> substitute/download/build speed though.)
>> >
>> > That should work.  You can post the patch here so we can test, if you
>> > want.
>> 
>> Sure, here is it:
>> 
>
>> From 4746292d8a672dbc3ea8d058baf6239974d92103 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
>> Date: Fri, 14 Oct 2016 22:57:53 +0800
>> Subject: [PATCH] gnu: gtk+: Move desktop files into "bin" output.
>> 
>> * gnu/packages/gtk.scm (gtk+)[arguments]: Add 'move-desktop-files' phase.
>
> Thanks, this works for me! With this patch, `guix system build` passed
> the point where it previously failed.

Pushed, thanks!
  

Patch

From 4746292d8a672dbc3ea8d058baf6239974d92103 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Fri, 14 Oct 2016 22:57:53 +0800
Subject: [PATCH] gnu: gtk+: Move desktop files into "bin" output.

* gnu/packages/gtk.scm (gtk+)[arguments]: Add 'move-desktop-files' phase.
---
 gnu/packages/gtk.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 183989b..0de1409 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -685,7 +685,16 @@  application suites.")
             (substitute* "testsuite/Makefile.in"
               (("SUBDIRS = gdk gtk a11y css reftests")
                "SUBDIRS = gdk"))
-            #t)))))
+            #t))
+        (add-after 'install 'move-desktop-files
+          ;; Move desktop files into 'bin' to avoid cycle references.
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out"))
+                  (bin (assoc-ref outputs "bin")))
+              (mkdir-p (string-append bin "/share"))
+              (rename-file (string-append out "/share/applications")
+                           (string-append bin "/share/applications"))
+              #t))))))
    (native-search-paths
     (list (search-path-specification
            (variable "GUIX_GTK3_PATH")
-- 
2.10.0