Bug#790423: icewm: missing dependency on shared-mime-info; without, it fails to load pixmaps/icons/graphics

Eduard Bloch edi at gmx.de
Mon Jun 29 19:24:43 UTC 2015


reassign libgdk-pixbuf2.0-0
retitle 790423 Fails to load xpms if mime cache folder is missing
thanks

Hallo,
* Thorsten Glaser [Mon, Jun 29 2015, 02:26:01PM]:
> Package: icewm
> Version: 1.3.8+githubmod+20150412+960629d-1
> Severity: important
> 
> Hi,
> 
> IceWM does not display pixmaps/icons/graphics (window decorations,
> start menu button, etc.) for me on some systems. I now found out
> why: shared-mime-info must be installed for that to work.

Yeah, you are right. I hacked the related code a little bit (see below)
to see what gdk-pixbuf actually does and it doesn't make much sense. In
the strace output, it attempts to read the cache and fails (wtf?). I
couldn't find any link to cache dependencies in the GDK docs.

When I do the same on a PC where shared-mime-info is installed, I see
some activity around mime.cache.
stat("/usr/share//mime/mime.cache", {st_mode=S_IFREG|0644, st_size=139316, ...}) = 0
Seriously? Why does it open the mime cache?

Some internet references indicate that one might rebuild a pixbuf
loaders cache with the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
But when I try to install apt-get install libgdk-pixbuf2.0-dev then it
pulls the shared-mime-info package as dependency which makes the
investigation pointless. But why, seriously, does it do that?

And what's the problem with missing mime cache again? Questions over
questions... :-(

    GError *gerror = 0;
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(cstring(filename.path()).c_str(), &gerror);
    std::cerr << "pixbuf returned: " << long(pixbuf) << " for " <<

    			cstring(filename.path()).c_str()
    		<< " and gerror: " << (gerror ? gerror->message : "")
    				<< std::endl;

access("/usr/share/icewm/themes/nice/close.xpm", R_OK) = 0
open("/usr/share/icewm/themes/nice/close.xpm", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=364, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa7b5cd8000
read(5, "/* XPM */\nstatic char *close_xpm"..., 4096) = 364
read(5, "", 4096)                       = 0
stat("/tmp/.local/share//mime/mime.cache", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/globs", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/magic", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/mime.cache", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/globs", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/magic", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/mime.cache", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/globs", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/magic", 0x7ffc9b2e8fa0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/mime.cache", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/globs2", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/globs", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/tmp/.local/share//mime/magic", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
open("/tmp/.local/share//mime/aliases", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/tmp/.local/share//mime/subclasses", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/tmp/.local/share//mime/icons", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/tmp/.local/share//mime/generic-icons", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/mime.cache", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/globs2", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/globs", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/local/share//mime/magic", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
open("/usr/local/share//mime/aliases", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share//mime/subclasses", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share//mime/icons", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share//mime/generic-icons", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/mime.cache", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/globs2", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/globs", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
stat("/usr/share//mime/magic", 0x7ffc9b2e8fd0) = -1 ENOENT (No such file or directory)
open("/usr/share//mime/aliases", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share//mime/subclasses", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share//mime/icons", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share//mime/generic-icons", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=3982, ...}) = 0
read(6, "# GdkPixbuf Image Loader Modules"..., 1024) = 1024
read(6, "0.0/loaders/libpixbufloader-tga."..., 1024) = 1024
read(6, "\n\"P5\" \"\" 100\n\"P6\" \"\" 100\n\n\"/usr/"..., 1024) = 1024
read(6, "\" \"The ICO image format\" \"LGPL\"\n"..., 1024) = 910
read(6, "", 1024)                       = 0
close(6)                                = 0
open("/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
futex(0x7fa7b326e568, FUTEX_WAKE, 2147483647) = 0
futex(0x7fa7b326e568, FUTEX_WAKE, 2147483647) = 0
close(5)                                = 0
munmap(0x7fa7b5cd8000, 4096)            = 0
write(2, "pixbuf returned: ", 17pixbuf returned: )       = 17
write(2, "0", 10)                        = 1
write(2, " for ", 5 for )                    = 5
write(2, "/usr/share/icewm/themes/nice/clo"..., 38/usr/share/icewm/themes/nice/close.xpm) = 38
write(2, " and gerror: ", 13 and gerror: )           = 13
write(2, "Couldn't recognize the image fil"..., 90Couldn't recognize the image file format for file '/usr/share/icewm/themes/nice/close.xpm') = 90
write(2, "\n", 1
)                       = 1
write(2, "IceWM: ", 7IceWM: )                  = 7
write(2, "Warning: ", 9Warning: )                = 9
write(2, "Out of memory for image /usr/sha"..., 62Out of memory for image /usr/share/icewm/themes/nice/close.xpm) = 62
write(2, "\n", 1

-- 
Every great idea is worthless without someone to do the work. --Neil Williams



More information about the pkg-gnome-maintainers mailing list