Summary: | x11-misc/shared-mime-info: broken freedesktop.org.xml for .pnm/.ppm mime | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | abyss <ndpires> |
Component: | [OLD] Unspecified | Assignee: | Freedesktop bugs <freedesktop-bugs> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | bgreen0, gentoo, Jeffrey.Ratcliffe, marcinzw, mr_bones_, nerevar, njsg |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | http://bugs.freedesktop.org/show_bug.cgi?id=19811 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | We should view this image with gqview |
Description
abyss
2009-03-05 17:44:18 UTC
Please precise: * which exact version you tested this with 2.14.7-r{0,1,2} ? * emerge --info * any error you get when starting those apps from command line ? (In reply to comment #1) > Please precise: > * which exact version you tested this with 2.14.7-r{0,1,2} ? > * emerge --info > * any error you get when starting those apps from command line ? > First of all thanks for your reply. ---------- until x11-libs/gtk+-2.12.12, there is no problem, but with x11-libs/gtk+-2.14.{4,5,7,7-r1,7-r2} have the same "incorrect" behaviour. ---------- When I start gqview --debug I have the following ouput : GQview 2.1.5, This is a beta release. debugging output enabled (level 1) loader reported [icns] [The ICNS image format] [.icns] loader reported [wbmp] [The WBMP image format] [.wbmp] loader reported [wmf] [Windows Metafile] [.wmf;.apm] loader reported [jpeg] [The JPEG image format] [.jpeg;.jpe;.jpg] loader reported [ani] [The ANI image format] [.ani] loader reported [bmp] [The BMP image format] [.bmp] loader reported [gif] [The GIF image format] [.gif] loader reported [ico] [The ICO image format] [.ico;.cur] loader reported [pcx] [The PCX image format] [.pcx] loader reported [png] [The PNG image format] [.png] loader reported [pnm] [The PNM/PBM/PGM/PPM image format family] [.pnm;.pbm;.pgm;.ppm] loader reported [ras] [The Sun raster image format] [.ras] loader reported [tga] [The Targa image format] [.tga;.targa] loader reported [xbm] [The XBM image format] [.xbm] loader reported [tiff] [The TIFF image format] [.tiff;.tif] loader reported [xpm] [The XPM image format] [.xpm] loader reported [svg] [Scalable Vector Graphics] [.svg;.svgz;.svg.gz] read ahead cancelled for :(null) image load completed "(null)" (current) image reset image begin image start error image load completed "/home/abyss/test.ppm" (current) read ahead cancelled for :(null) image load completed "/home/abyss/test.ppm" (current) ---------------- My emerge infos : Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-gentoo-r2 x86_64) ================================================================= System uname: Linux-2.6.28-gentoo-r2-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_170-with-glibc2.2.5 Timestamp of tree: Wed, 04 Mar 2009 22:35:01 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 dev-util/cmake: 2.4.6-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://91.121.124.139/gentoo-distfiles/ ftp://91.121.125.139/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/vmware" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip X X509 Xaw3d a52 aac accessibility ace acl acpi alsa amd64 apm autoipd avahi bash-completion berkdb bluetooth bzip2 cdda cddb chroot cli colordiff cracklib crypt cups dbus device-mapper directfb divx encode fbcon flac fortran gdbm gif glitz glut gpm gstreamer gtk h323 hal iconv imagemagick imlib imlib2 iproute2 ipv6 isdnlog jbig jpeg jpeg2k lame lapack latex lcd lcms live lm_sensors lzo mad matroska mdnsresponder-compat midi mjpeg mmx mng mp2 mp3 mp3rtp mp4 mpeg mpeg2 mplayer mudflap multilib ncurses netpbm networkmanager nls nptl nptlonly nsplugin ogg openal opengl openmp pam pcre pdf perl php plotutils pmount pmu png pnm postscript pppd python qt3 qt3support qt4 quicktime rar readline realmedia reflection reiserfs rle rpm samba sdl sdl-image sdl-sound sdlaudio session smp smpeg spell spl sse sse2 ssl startup-notification stream subversion svg svgz sysfs sysvipc t1lib tcpd tetex theora tiff tools truetype unicode upnp usb v4l v4l2 vcd vcdx vim vim-syntax vim-with-x vlm vnc vncviewer vorbis wav wavpack wma wmf wmp wxwindows x11vnc x264 x86emu xcb xcomposite xfce xinerama xml xorg xpm xprint xrandr xv zlib" ALSA_CARDS="via82xx mpu401" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Best regards I notice that GTK+-2.14.7-r2 is now in stable stage BUT there is a trouble with pgm family files, all program who use gtk lib cannot read pgm files anymore!! Like ristretto and gqview. Please don't touch bugzilla fields and don't randomly assign people. Gilles is already in the gnome alias. Thanks (In reply to comment #4) > Please don't touch bugzilla fields and don't randomly assign people. Gilles is > already in the gnome alias. > > Thanks > Ok I apologies, But gtk+-2.14.7-r2 was set to stable in portage although I post this which seems to be a bug. I should have said that it works fine here in epiphany, eog, gthumb, ... @abyss, do you have any sample files you could attach to bugzilla? Thanks Created attachment 185121 [details]
We should view this image with gqview
That file works fine here with eog and nautilus, and I even emerged gqview to test it, and it works fine with that. (In reply to comment #9) > That file works fine here with eog and nautilus, and I even emerged gqview to > test it, and it works fine with that. > Ok so I should wait for the integration of the gtk+ correction in Gentoo portage ? Because for the moment the buggy version 2.14.7-r2 is always set as stable whereas it should not. You misunderstand. 2.14.7-r2 works fine for us. We cannot fix what we cannot reproduce. (In reply to comment #11) > You misunderstand. 2.14.7-r2 works fine for us. We cannot fix what we cannot > reproduce. > Ok I found the problem maybe only for my machine (?), actually it is pgm header problem : If my PGM header does not contain a comment line, gqview is not able to read the image, but if I add a comment then it's work. So, P5 1280 300 255 ===> does not work P5 # 1280 300 255 ===> WORKS But programs like eog, feh always work. Something is strange for me. So thank a LOT you for your help. maybe this bug should be reassigned to gqview maintainers then ? (In reply to comment #13) > maybe this bug should be reassigned to gqview maintainers then ? > Ok I think I will reassign it to gqview, but if I assigned it to gtk+ it was because it seems that gqview uses gtk+ to load pgm files and I believe when we use gtk+ to open a pgm file the gtk+ lib automatically manage different way of headers, so I'm a little embarrassed. Another time thanks a lot for your patience. Not a problem that it was mis-assigned in the first place. It happens all the time. Re-assigning to gqview maintainers. I am having the same problem, which started when I upgraded to gtk+-2.14.7-r2, and I have some more details. The attached test.pgm works in gqview for me, though it does not work if I take out the comment line (which can be done in vi). The problem is not specific to gqview, however. It seems to be with the gdk-pixbuf library that is part of gtk+. I have used the gdk_pixbuf_new_from_file() call directly and verified that it fails to load ppms/pgms. eog works because it does not use this call - it uses g_file_info_get_content_type() to successfully query the image type, and then builds a GdkPixbufLoader with the mime information. So the problem is with gtk, not gqview. Please test with the already attached test.pgm, but with the comment line removed! (In reply to comment #17) > I am having the same problem, which started when I upgraded to gtk+-2.14.7-r2, > and I have some more details. > > The attached test.pgm works in gqview for me, though it does not work if I take > out the comment line (which can be done in vi). The problem is not specific to > gqview, however. It seems to be with the gdk-pixbuf library that is part of > gtk+. I have used the gdk_pixbuf_new_from_file() call directly and verified > that it fails to load ppms/pgms. eog works because it does not use this call - > it uses g_file_info_get_content_type() to successfully query the image type, > and then builds a GdkPixbufLoader with the mime information. > > So the problem is with gtk, not gqview. Please test with the already attached > test.pgm, but with the comment line removed! > I was expecting some news for a while and your notices help me to prove that it is not a gqview trouble because as you I was turning into trouble when I upgraded to gkt+-2.14.7-* but I didn't know where and how find the origin. So thanks for your help and maybe now someone can fix this bug. I have additional evidence that the fault is in gtk+. gtk+-2.14.7 causes the xscreensavers hacks VidWacker and WebCollage to fail. They won't load any images at all. Both hacks use netpbm to process the images and sends PPM images to xscrensaver-getimage through tmp-files. VidWacker gives the following error message to the console (when run from xscreensaver-demo): xscreensaver-getimage: unable to load "/tmp/vidwhacker-a37ac611" xscreensaver-getimage: reason: Couldn't recognize the image file format for file '/tmp/vidwhacker-a37ac611' I can confirm that downgrading to gtk+-2.12.11 makes it work as expected again. Please ask if you want me to test other versions. emerge --info Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r7 x86_64) ================================================================= System uname: Linux-2.6.27-gentoo-r7-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-glibc2.2.5 Timestamp of tree: Mon, 04 May 2009 02:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.7 dev-lang/python: 2.5.4-r2 dev-python/pycrypto: 2.0.1-r8 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.2-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=core2 -O2 -pipe" DISTDIR="/var/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.gentoo.se http://ftp.public.fix.fi/gentoo http://mirror.gentoo.no" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en" MAKEOPTS="-j5" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/portage" PORTDIR_OVERLAY="/var/overlays/local" SYNC="rsync://rsync.se.gentoo.org/gentoo-portage" USE="X Xaw3d aac alsa amd64 apache2 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib dbus dri dvd dvdr dvdread emboss encode evo exif fam firefox fortran gdbm gif gtk hddtemp iconv isdnlog java java6 jpeg lcms lzma mad midi mmx mp3 mpeg mudflap multilib ncurses nptl nptlonly offensive ogg opengl openmp pam pcre perl png ppds pppd python qt3support quicktime readline reflection sdl session source spl sse sse2 ssl ssse3 startup-notification svg sysfs tiff timidity truetype unicode usb vim-syntax vorbis wma xinerama xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Upstream bug that may be of interest: http://bugzilla.gnome.org/show_bug.cgi?id=569671 (In reply to comment #20) > Upstream bug that may be of interest: > http://bugzilla.gnome.org/show_bug.cgi?id=569671 > I red this bug and notice that the proposed patch is applied in gtk+-2.16.1, but unfortunately I always can't read p?m files correctly. Confirming with gqview-2.1.5 and gtk+-2.14.7-r2 and the comment line thing... I had the same problem. The problem occurred since gtk+ 2.14, because they changed the content guessing for gdk to GIO (glib). First I created patch which reverted to the previous code, but then the real solution is quite simple. The problem is a package 'shared-mime-info' since 0.51. Someone explicitly added a line <match value="#" type="string" offset="3"/> to the file freedesktop.org.xml (/usr/share/mime/packages). For example pbm format: <magic priority="50"> <match value="P2" type="string" offset="0"> <match value="0x0a" type="byte" offset="2"> <match value="#" type="string" offset="3"/> </match> </match> ... I simply removed lines with "#" <magic priority="50"> <match value="P2" type="string" offset="0"> <match value="0x0a" type="byte" offset="2"> </match> </match> ... for each image/x-portable-*. Then as a root: # update-mime-database /usr/share/mime Now, everything seems to work again. (In reply to comment #23) Yeaah! Good job Marcin! Modifying my freedesktop.org.xml as you advise do the trick. Now I can view my p?m files. Thank you. (In reply to comment #23) I can't believe this problem still exists with ~amd64 Fixing the mime database as described by Marcin solves the problem. 30 minutes to find the bug and 30s to incorporate Marcin's fix. Why isn't this being addressed? Is it not assigned to the right herd? As per Comment #23 the problem is in freedesktop.org.xml file provided by shared-mime-info. Also, I don't see link here to upstream bug at freedesktop's bugzilla against shared-mime-info, so unlikely it will get into portage before it's reported. I can confirm this still happens with gtk+-2.18.9 and gqview-2.1.5. And the workaround still works. So the problem still exists and is in that freedesktop.org.xml. This was added upstream to "prevent" text files from being detected as anymaps (if your file happens to have a sharp on the second line, I guess it's still misdetected). The specific issue is bug 2359 at FreeDesktop.org bugzilla, https://bugs.freedesktop.org/show_bug.cgi?id=2359 Well, the magic P1\x0a (without "#") works for me and I think in case that e.g. imagemagick does not use (default) comments in pbm, ppm, pgm files it is a better option. "man 5 ppm" doesn't say a comment is mandatory, it only says comments can be written there. The way that (freedesktop) rule is written does not match this specification. Try shared-mime-info-0.80. If it still doesn't work, please link us to the upstream bug you've opened. I'll close this off as UPSTREAM in 3 months otherwise. Sorry for the late feedback, I tried it now with shared-mime-info-0.80 (which is already installed, as now it's the stable version), and it doesn't work: Opening this bug's attachment as is in gqview works as expected, but if I remove its second line (the comment), gqview doesn't recognize the file format. AFAIK there's no upstream bug on this issue yet, only the bug mentioned above, whose fix is causing this bug: https://bugs.freedesktop.org/show_bug.cgi?id=2359 (I don't know about the Gnome bug, IIRC it was about a specific program being unable to view images, what doesn't sound like *the* upstream, but Gnome bugzilla has been down for a while, so I wasn't able to double-check yet.) After realising I only searched for *open* freedesktop bugs, and redoing the search the right way, I found out https://bugs.freedesktop.org/show_bug.cgi?id=19811, where it is said gtk+ shouldn't be using shared-mime-info. So maybe this has, after all, to do with gtk/gnome? OK, closing as WONTFIX per upstream https://bugs.freedesktop.org/show_bug.cgi?id=19811#c3 |