unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* gnome-tweak-tool tweaks
@ 2016-06-06  6:09 Jan Nieuwenhuizen
  2016-06-10 12:24 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-06  6:09 UTC (permalink / raw)
  To: guix-devel

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

Hi,

When starting gnome-tweak-tool, it prints a warning

    GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.

The patch below has gnome-tweak-tool communicate with gsettings instead
of using the `memory.  I'm not sending it as a fix yet because 
gnome-tweak-tool does not list any themes, as davexunit reported.

I'm attaching the log that I get when building it, there's a warning
about xml files not being written and collisions, could that be the
cause of missing themes?

Greetings, Jan

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8384c76..c9463e8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5170,7 +5170,8 @@ desktop.  It supports multiple calendars, monthly view and yearly view.")
      `(("python" ,python-2)
        ("python2-pygobject" ,python2-pygobject)))
     (propagated-inputs
-     `(("libnotify" ,libnotify)
+     `(("dconf" ,dconf)
+       ("libnotify" ,libnotify)
        ("gobject-introspection" ,gobject-introspection)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)))



[-- Attachment #2: gnome-tweak-tool.log --]
[-- Type: application/octet-stream, Size: 4273 bytes --]

The following derivations will be built:
   /gnu/store/663w11470vdlsrd7mjmy1i2qwkydp6rg-profile.drv
   /gnu/store/xsgrimzg2s9kgm81knx7dg5j49knw6q9-ca-certificate-bundle.drv
   /gnu/store/mg8pcfpfjppq2wxhg823h6iz8fd03ggz-info-dir.drv
   /gnu/store/brzxgcnq79knv7lsw0plx2z1d2j1qav8-xdg-mime-database.drv
   /gnu/store/59z5lpy1cjj0q4pkxv6xqiksagl1z4zv-gtk-icon-themes.drv
   /gnu/store/cc8p79fbrk0m3cqnz480pzgdyh7z90mx-gnome-tweak-tool-3.20.1.drv
grafting '/gnu/store/c85dch4sgcw7r6immymg6j96nv9dcqx6-gnome-tweak-tool-3.20.1' -> '/gnu/store/442hy6ax73mqplfym5kg984jgxx5vhxs-gnome-tweak-tool-3.20.1'...
warning: collision encountered: /gnu/store/442hy6ax73mqplfym5kg984jgxx5vhxs-gnome-tweak-tool-3.20.1/share/icons/hicolor/icon-theme.cache /gnu/store/z1bylg8gwxs9q8lcxdr38y11yc15q25n-gtk+-3.20.3/share/icons/hicolor/icon-theme.cache 
warning: arbitrarily choosing /gnu/store/442hy6ax73mqplfym5kg984jgxx5vhxs-gnome-tweak-tool-3.20.1/share/icons/hicolor/icon-theme.cache
I/O error : Permission denied
I/O error : Permission denied
Failed to write XML file; For permission problems, try rerunning as root
warning: collision encountered: /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/zh_CN/LC_MESSAGES/bfd.mo /gnu/store/wqsw0xrk6sgk0hz15pgcydfg6hvhgcz2-gdb-7.11/share/locale/zh_CN/LC_MESSAGES/bfd.mo 
warning: arbitrarily choosing /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/zh_CN/LC_MESSAGES/bfd.mo
warning: collision encountered: /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/zh_CN/LC_MESSAGES/opcodes.mo /gnu/store/wqsw0xrk6sgk0hz15pgcydfg6hvhgcz2-gdb-7.11/share/locale/zh_CN/LC_MESSAGES/opcodes.mo 
warning: arbitrarily choosing /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/zh_CN/LC_MESSAGES/opcodes.mo
warning: collision encountered: /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/fr/LC_MESSAGES/opcodes.mo /gnu/store/wqsw0xrk6sgk0hz15pgcydfg6hvhgcz2-gdb-7.11/share/locale/fr/LC_MESSAGES/opcodes.mo 
warning: arbitrarily choosing /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/locale/fr/LC_MESSAGES/opcodes.mo
warning: collision encountered: /gnu/store/plvmmcirhkk7hydrq6ppdblaamc4x8hx-openssh-7.2p2/share/man/man8/sftp-server.8.gz /gnu/store/q7q18jifxb7mn1w8gvf7xpxv1j3amkhs-lsh-2.1/share/man/man8/sftp-server.8.gz 
warning: arbitrarily choosing /gnu/store/plvmmcirhkk7hydrq6ppdblaamc4x8hx-openssh-7.2p2/share/man/man8/sftp-server.8.gz
warning: collision encountered: /gnu/store/l3bmrhznypa8cww56vjykvn5rrhpzzb6-gtk-icon-themes/share/icons/hicolor/icon-theme.cache /gnu/store/442hy6ax73mqplfym5kg984jgxx5vhxs-gnome-tweak-tool-3.20.1/share/icons/hicolor/icon-theme.cache /gnu/store/z1bylg8gwxs9q8lcxdr38y11yc15q25n-gtk+-3.20.3/share/icons/hicolor/icon-theme.cache 
warning: arbitrarily choosing /gnu/store/l3bmrhznypa8cww56vjykvn5rrhpzzb6-gtk-icon-themes/share/icons/hicolor/icon-theme.cache
warning: collision encountered: /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/info/bfd.info.gz /gnu/store/wqsw0xrk6sgk0hz15pgcydfg6hvhgcz2-gdb-7.11/share/info/bfd.info.gz 
warning: arbitrarily choosing /gnu/store/fh8wgg81w1lv9qlyfcxcmg52xc4qjw7l-gcc-toolchain-6.1.0/share/info/bfd.info.gz
warning: collision encountered: /gnu/store/ivmjc25mp7q43bydpsdn7ilzlp2g26id-gsettings-desktop-schemas-3.20.0/share/glib-2.0/schemas/gschemas.compiled /gnu/store/z1bylg8gwxs9q8lcxdr38y11yc15q25n-gtk+-3.20.3/share/glib-2.0/schemas/gschemas.compiled /gnu/store/5cvylk5vfxa6ka3qmvm13w68lf9k384l-gnome-screenshot-3.18.0/share/glib-2.0/schemas/gschemas.compiled 
warning: arbitrarily choosing /gnu/store/ivmjc25mp7q43bydpsdn7ilzlp2g26id-gsettings-desktop-schemas-3.20.0/share/glib-2.0/schemas/gschemas.compiled
33 packages in profile
The following environment variable definitions may be needed:
   export GI_TYPELIB_PATH="/home/janneke/.guix-profile/lib/girepository-1.0"
   export GUIX_GTK3_PATH="/home/janneke/.guix-profile/lib/gtk-3.0"
   export C_INCLUDE_PATH="/home/janneke/.guix-profile/include"
   export CPLUS_INCLUDE_PATH="/home/janneke/.guix-profile/include"
   export GUILE_LOAD_COMPILED_PATH="/home/janneke/.guix-profile/lib/guile/2.2/ccache"
07:48:22 janneke@drakenvlieg:~/src/guix 

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]



-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: gnome-tweak-tool tweaks
  2016-06-06  6:09 gnome-tweak-tool tweaks Jan Nieuwenhuizen
@ 2016-06-10 12:24 ` Ludovic Courtès
  2016-06-11  3:49   ` 宋文武
  2016-06-11  7:21   ` Jan Nieuwenhuizen
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-06-10 12:24 UTC (permalink / raw)
  To: Jan Nieuwenhuizen, iyzsong; +Cc: guix-devel

Hello!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> When starting gnome-tweak-tool, it prints a warning
>
>     GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
>
> The patch below has gnome-tweak-tool communicate with gsettings instead
> of using the `memory.  I'm not sending it as a fix yet because 
> gnome-tweak-tool does not list any themes, as davexunit reported.

So does the patch fix something?  (Sorry, I’m quite ignorant about
GNOMEy things.)

> I/O error : Permission denied
> I/O error : Permission denied
> Failed to write XML file; For permission problems, try rerunning as root

I found that string comes from ‘shared-mime-info’, which is itself used
by the ‘xdg-mime-database’ hook in (guix profiles) (a hook that runs
when the profile is created to update the MIME database):

--8<---------------cut here---------------start------------->8---
static gboolean save_xml_file(xmlDocPtr doc, const gchar *filename, GError **error)
{
#if LIBXML_VERSION > 20400
	if (xmlSaveFormatFileEnc(filename, doc, "utf-8", 1) < 0)
	{
		g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
			    "Failed to write XML file; For permission problems, try rerunning as root");
		return FALSE;
	}
#else
--8<---------------cut here---------------end--------------->8---

宋文武: any idea what the problem might be?  Perhaps
‘update-mime-database’ is trying to write to /gnu/store/…-something?

Also, it’s a problem that ‘update-mime-database’ returns 0 here, as
seems to be the case.

Thanks,
Ludo’.

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

* Re: gnome-tweak-tool tweaks
  2016-06-10 12:24 ` Ludovic Courtès
@ 2016-06-11  3:49   ` 宋文武
  2016-06-12 19:42     ` Ludovic Courtès
  2016-06-11  7:21   ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 7+ messages in thread
From: 宋文武 @ 2016-06-11  3:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) writes:

> [...]
>
>> I/O error : Permission denied
>> I/O error : Permission denied
>> Failed to write XML file; For permission problems, try rerunning as root
>
> I found that string comes from ‘shared-mime-info’, which is itself used
> by the ‘xdg-mime-database’ hook in (guix profiles) (a hook that runs
> when the profile is created to update the MIME database):
>
> static gboolean save_xml_file(xmlDocPtr doc, const gchar *filename, GError **error)
> {
> #if LIBXML_VERSION > 20400
> 	if (xmlSaveFormatFileEnc(filename, doc, "utf-8", 1) < 0)
> 	{
> 		g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
> 			    "Failed to write XML file; For permission problems, try rerunning as root");
> 		return FALSE;
> 	}
> #else
>
> 宋文武: any idea what the problem might be?  Perhaps
> ‘update-mime-database’ is trying to write to /gnu/store/…-something?
Yep, it happends when '$out/share/mime/application' is not writable.
The xml files under 'application' are going to be generated by
update-mime-database, and the shared-mime-info package has it
pre-generated, so after union "share/mime", an un-writable 'application'
directory point to the store will cause the problem.

Commit 359f06aa fix this by union the "share/mime/packages" directory.

>
> Also, it’s a problem that ‘update-mime-database’ returns 0 here, as
> seems to be the case.
It returns 256 here for the problem, but the derivation still built and
profile got updated, I have no idea about this :-

Does a failing hook (returns #f) supposed to top the profile update?

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

* Re: gnome-tweak-tool tweaks
  2016-06-10 12:24 ` Ludovic Courtès
  2016-06-11  3:49   ` 宋文武
@ 2016-06-11  7:21   ` Jan Nieuwenhuizen
  2016-06-12 20:21     ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-11  7:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

>> The patch below has gnome-tweak-tool communicate with gsettings instead
>> of using the `memory.  I'm not sending it as a fix yet because 
>> gnome-tweak-tool does not list any themes, as davexunit reported.
>
> So does the patch fix something?  (Sorry, I’m quite ignorant about
> GNOMEy things.)

That depends on how you look at it.  It takes away the cause of the
warning message, so now settings are sent to gnome-settings instead
of kept in-memory.  However, I'm still not sure that gnome-settings
saves its settings, which should happen upon logout which we do not
have yet.

So one chain in the link is fixed, but I think there is still another
link that is broken.

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

* Re: gnome-tweak-tool tweaks
  2016-06-11  3:49   ` 宋文武
@ 2016-06-12 19:42     ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-06-12 19:42 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

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

iyzsong@member.fsf.org (宋文武) skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> [...]
>>
>>> I/O error : Permission denied
>>> I/O error : Permission denied
>>> Failed to write XML file; For permission problems, try rerunning as root
>>
>> I found that string comes from ‘shared-mime-info’, which is itself used
>> by the ‘xdg-mime-database’ hook in (guix profiles) (a hook that runs
>> when the profile is created to update the MIME database):
>>
>> static gboolean save_xml_file(xmlDocPtr doc, const gchar *filename, GError **error)
>> {
>> #if LIBXML_VERSION > 20400
>> 	if (xmlSaveFormatFileEnc(filename, doc, "utf-8", 1) < 0)
>> 	{
>> 		g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
>> 			    "Failed to write XML file; For permission problems, try rerunning as root");
>> 		return FALSE;
>> 	}
>> #else
>>
>> 宋文武: any idea what the problem might be?  Perhaps
>> ‘update-mime-database’ is trying to write to /gnu/store/…-something?
> Yep, it happends when '$out/share/mime/application' is not writable.
> The xml files under 'application' are going to be generated by
> update-mime-database, and the shared-mime-info package has it
> pre-generated, so after union "share/mime", an un-writable 'application'
> directory point to the store will cause the problem.
>
> Commit 359f06aa fix this by union the "share/mime/packages" directory.

OK, thanks for the quick (brown?) fix!

>> Also, it’s a problem that ‘update-mime-database’ returns 0 here, as
>> seems to be the case.
> It returns 256 here for the problem, but the derivation still built and
> profile got updated, I have no idea about this :-
>
> Does a failing hook (returns #f) supposed to top the profile update?

I thought it did, but it doesn’t:

  (gexp->derivation "foo" #~(begin (mkdir #$output) #f))

leads a derivation that succeeds, contrary to
‘build-expression->derivation’.

To avoid that, we need an explicit (exit #f).

For now I prefer to address it at every call site (patch below) instead
of adding some magic to ‘gexp->derivation’, which would be hard to do in
a hygienic way.

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1896 bytes --]

--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -510,9 +510,9 @@ MANIFEST."
                     info (string-append #$output "/share/info/dir"))))
 
         (mkdir-p (string-append #$output "/share/info"))
-        (every install-info
+        (exit (every install-info
                      (append-map info-files
-                           '#$(manifest-inputs manifest)))))
+                                 '#$(manifest-inputs manifest))))))
 
   (gexp->derivation "info-dir" build
                     #:modules '((guix build utils))
@@ -562,7 +562,7 @@ entries of MANIFEST, or #f if MANIFEST does not have any GHC packages."
                 (system* (string-append #+ghc "/bin/ghc-pkg") "recache"
                          (string-append "--package-db=" db-dir)))))
           (for-each delete-file (find-files db-dir "\\.conf$"))
-          success)))
+          (exit success))))
 
   (with-monad %store-monad
     ;; Don't depend on GHC when there's nothing to do.
@@ -710,7 +710,7 @@ MIME type."
             (mkdir-p (string-append #$output "/share"))
             (union-build destdir appdirs
                          #:log-port (%make-void-port "w"))
-            (zero? (system* update-desktop-database destdir)))))
+            (exit (zero? (system* update-desktop-database destdir))))))
 
     ;; Don't run the hook when 'desktop-file-utils' is not referenced.
     (if desktop-file-utils
@@ -745,7 +745,7 @@ entries.  It's used to query the MIME type of a given file."
             (union-build (string-append destdir "/packages") pkgdirs
                          #:log-port (%make-void-port "w"))
             (setenv "XDG_DATA_HOME" datadir)
-            (zero? (system* update-mime-database destdir)))))
+            (exit (zero? (system* update-mime-database destdir))))))
 
     ;; Don't run the hook when 'shared-mime-info' is referenced.
     (if shared-mime-info

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

* Re: gnome-tweak-tool tweaks
  2016-06-11  7:21   ` Jan Nieuwenhuizen
@ 2016-06-12 20:21     ` Ludovic Courtès
  2016-06-12 21:18       ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2016-06-12 20:21 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: guix-devel

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> Ludovic Courtès writes:
>
>>> The patch below has gnome-tweak-tool communicate with gsettings instead
>>> of using the `memory.  I'm not sending it as a fix yet because 
>>> gnome-tweak-tool does not list any themes, as davexunit reported.
>>
>> So does the patch fix something?  (Sorry, I’m quite ignorant about
>> GNOMEy things.)
>
> That depends on how you look at it.  It takes away the cause of the
> warning message, so now settings are sent to gnome-settings instead
> of kept in-memory.  However, I'm still not sure that gnome-settings
> saves its settings, which should happen upon logout which we do not
> have yet.
>
> So one chain in the link is fixed, but I think there is still another
> link that is broken.

To put it differently: do we need to apply it, or does it just serve as
an illustration for the discussion?  :-)

Ludo’.

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

* Re: gnome-tweak-tool tweaks
  2016-06-12 20:21     ` Ludovic Courtès
@ 2016-06-12 21:18       ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2016-06-12 21:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès writes:

> To put it differently: do we need to apply it, or does it just serve as
> an illustration for the discussion?  :-)

It's okay to apply it, but I suspect more coming.  I think/hope
davexunit found something wrt XDG_DATA_DIRS and theming, kori reported
libsoup and gnome-desktop were needed, which I also don't know what to
do with yet.

Greetings,
Jan

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

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

end of thread, other threads:[~2016-06-12 21:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06  6:09 gnome-tweak-tool tweaks Jan Nieuwenhuizen
2016-06-10 12:24 ` Ludovic Courtès
2016-06-11  3:49   ` 宋文武
2016-06-12 19:42     ` Ludovic Courtès
2016-06-11  7:21   ` Jan Nieuwenhuizen
2016-06-12 20:21     ` Ludovic Courtès
2016-06-12 21:18       ` Jan Nieuwenhuizen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).