Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471984 - dev-python/pyxdg-0.25 fails test test-mime.MimeTest
Summary: dev-python/pyxdg-0.25 fails test test-mime.MimeTest
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
: 477202 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-01 09:50 UTC by Markus Walter
Modified: 2018-04-21 19:29 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info.txt,6.23 KB, text/plain)
2013-06-01 09:50 UTC, Markus Walter
Details
build log (dev-python:pyxdg-0.25:20130531-171706.log,10.19 KB, text/plain)
2013-06-01 09:50 UTC, Markus Walter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2013-06-01 09:50:20 UTC
Created attachment 349812 [details]
emerge --info

On my hardened ~amd64 machine with gcc-4.8.0 I see the following test failure for pyxdg.

======================================================================
FAIL: test_get_type (test-mime.MimeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pyxdg-0.25/work/pyxdg-0.25/test/test-mime.py", line 40, in test_get_type
    self.check_mimetype(imgpng, 'image', 'png')
  File "/var/tmp/portage/dev-python/pyxdg-0.25/work/pyxdg-0.25/test/test-mime.py", line 11, in check_mimetype
    self.assertEqual(mimetype.subtype, subtype)
AssertionError: 'x-apple-ios-png' != 'png'
Comment 1 Markus Walter 2013-06-01 09:50:51 UTC
Created attachment 349814 [details]
build log
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2013-07-15 04:50:51 UTC
The real fix is this change to the shared-mime-info data:

http://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=0c41ac819d483b3de89de1c2e58cdfbcf1f0f3c7.

The ever reliable Arfrever filed this upstream mid May.  The above is a snippet from the final comment.  The bug and the fix lies in the dep package shared-mime-info, which comes under the banner of the <herd>freedesktop</herd>.

There is currently no new release to shared-mime-info, so the above commit still is not in place in shared-mime-info.  Markus if you're still reading and still keen, tread on the toes of those of freedesktop and ask please fix broken shared-mime-info because I can do more no more than that.  This is not a bug in dev-python/pyxdg-0.25.
Comment 3 Markus Walter 2013-07-17 20:29:30 UTC
I tried the patch for shared-mime-info and this did not solve the problem for me, the test still failed in the same way, however it's quite possible that I messed it up somewhere. Needs to be investigated.
Comment 4 Mike Gilbert gentoo-dev 2013-07-17 23:36:05 UTC
*** Bug 477202 has been marked as a duplicate of this bug. ***
Comment 5 Mike Gilbert gentoo-dev 2013-07-17 23:37:50 UTC
Re-opening; this is certainly not impossible to fix.
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2013-07-18 11:59:17 UTC
(In reply to Markus Oehme from comment #3)
> I tried the patch for shared-mime-info and this did not solve the problem
> for me, the test still failed in the same way, however it's quite possible
> that I messed it up somewhere. Needs to be investigated.

Does this amount to;
The real fix is this change to the shared-mime-info data:
amounts to erronoeous?
Comment 7 Markus Walter 2013-07-18 15:10:31 UTC
(In reply to Ian Delaney from comment #6)
> Does this amount to;
> The real fix is this change to the shared-mime-info data:
> amounts to erronoeous?

I did a bit more testing. If I apply the patch [1] from comment 2 I see the exact same test failure as with shared-mime-info-1.1 from the tree (I verified that the patch did actually apply). So this does not seem to be the fix it was thought to be.

However if I delete the x-apple-ios-png mime entry in shared-mime-info-1.1 the test failure vanishes as expected.

[1] http://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=0c41ac819d483b3de89de1c2e58cdfbcf1f0f3c7
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 19:29:06 UTC
I've just committed 0.26 and it passes all tests for me.