GNOME Bugzilla – Bug 751299
test-suite failure for test_xdg_dirs if ~/.config/user-dirs.dirs
Last modified: 2015-07-03 06:57:26 UTC
Version: 3.16.2 Since commit 9948a67e677c8a351f2de17080d7a671882570f3 I get test-suite failures for pygobject in test_xdg_dirs. The problem is, that d = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC) returns "None". This is because on our buildds, xdg-user-dirs is not installed and there is no ~/.config/user-dirs.dirs To reproduce the problem, make sure there is no ~/.config/user-dirs.*, then run python: >>> from gi.repository import GLib >>> d = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC) >>> print d None Interestingly, d = GLib.get_user_special_dir(GLib.USER_DIRECTORY_DESKTOP) works, even if ~/.config/user-dirs.dirs missing and returns $HOME/Desktop. So it seems there is a fallback path for the case ~/.config/user-dirs.dirs, but this only works for GLib.USER_DIRECTORY_DESKTOP but not GLib.UserDirectory.DIRECTORY_MUSIC. I'm not sure, if this is a bug in gobject-introspection, glib itself or pygobject.
Created attachment 305788 [details] [review] Fix test regression when xdg-user-dirs is not installed. GLib.get_user_special_dir is only guaranteed to always return a path in case GLib.UserDirectory.DIRECTORY_DESKTOP is passed. This was unintentionally changed to DIRECTORY_MUSIC in 9948a67e677c8a351f2de1708.
Assuming this is expected behaviour from GLib, patch lgtm.
Review of attachment 305788 [details] [review]: Thanks, feel free to commit stuff like this without review, just add a commit link in bugzilla.
Thanks. Pushed to master: https://git.gnome.org/browse/pygobject/commit/?id=1ed8200abefc3e51e4d2083b1372695aaf4163fb 3.16: https://git.gnome.org/browse/pygobject/commit/?h=pygobject-3-16&id=5cfe5b500870cd65386bff91ec12e7f263831f97 (I don't have permissions to close this bug report..)
(In reply to Christoph Reiter (lazka) from comment #4) > (I don't have permissions to close this bug report..) If you didn't already do this: https://wiki.gnome.org/Bugsquad/ForMaintainers#To_get_permissions_to_edit_bugs
(In reply to Christoph Reiter (lazka) from comment #4) > (I don't have permissions to close this bug report..) Granted. Note: Any developer should be able to do this (not sure if wiki was updated).
(In reply to Olav Vitters from comment #6) > (In reply to Christoph Reiter (lazka) from comment #4) > > (I don't have permissions to close this bug report..) > > Granted. Thanks!