[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-30 Thread Launchpad Bug Tracker
This bug was fixed in the package qtbase-opensource-src - 5.15.2+dfsg-6 --- qtbase-opensource-src (5.15.2+dfsg-6) unstable; urgency=medium * Backport upstream patch to adjust QMimeDatabase behavior (LP: #1857824). * Make qtbase5-dev break qt5-default (see #976389, LP: #1920130).

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-30 Thread Dmitry Shachnev
The fix should land in Impish (21.10) very soon: https://launchpad.net/ubuntu/+source/qtbase-opensource-src/5.15.2+dfsg-6. Do you also want a fix for Hirsute (21.04)? If yes, you can help me by filling the SRU template in the description (see

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-18 Thread Dmitry Shachnev
Thank you for the links! ** Changed in: qtbase-opensource-src (Ubuntu) Status: New => In Progress ** Changed in: qtbase-opensource-src (Ubuntu) Assignee: (unassigned) => Dmitry Shachnev (mitya57) -- You received this bug notification because you are a member of Ubuntu Bugs, which

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-18 Thread Kai Kasurinen
Confirmed that patched [1][2] Qt fixes this bug. [1] https://codereview.qt-project.org/c/qt/qtbase/+/328240 [2] https://launchpadlibrarian.net/539330399/qtbase-opensource-src_5.15.2+dfsg-5+0.drop.0_5.15.2+dfsg-5+0.drop.1.diff.gz -- You received this bug notification because you are a member of

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-18 Thread Kai Kasurinen
specially: "The spec hasn't changed, but I made the same mistake in xdgmime (the reference implementation) and in Qt: when multiple globs match, and the result from magic sniffing is unrelated to any of those globs, then I used the magic result, but that's wrong, globs have priority and one of

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-18 Thread Dmitry Shachnev
Qt actually prefers system copy from shared-mime-info if it's available. Here is the code for 5.12.8 (used in Ubuntu 20.04): https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/mimetypes/qmimedatabase.cpp?h=5.12.8#n99 The internal copy (":/qt-project.org/qmime") is only used when the system

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2021-05-18 Thread Kai Kasurinen
maybe fixed: https://codereview.qt-project.org/c/qt/qtbase/+/328240 ** Package changed: kde-cli-tools (Ubuntu) => qtbase-opensource-src (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1857824

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-25 Thread Alex A. D.
Please, checkout my last comment on the related bug #1890716 here: https://bugs.launchpad.net/ubuntu/+source/shared-mime- info/+bug/1890716/comments/15 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-23 Thread Sebastien Bacher
Could you please stop that reassigning game? You are right, it's either on shared-mime-info or the qt integration, now the result of the testcase provided is correct on GNOME (see comment 5), it's also correct on a cloud instance (e.g no desktop integration) so it's only buggy on KDE, you should

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-23 Thread Kai Kasurinen
testing with xdgmime [1] (reference implementation of the spec [2] and also used tests on shared-mine-type): > ../xdgmime/src/print-mime-data . test.py: name: text/x-python data: application/xhtml+xml file: application/xhtml+xml > ../xdgmime/src/test-mime test.py File

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-23 Thread Sebastien Bacher
@Kai, so you use a 'command is provided by a perl utility' as a reason to reasing to shared-mime-info, what's the logic? also xdg-mime works fine under GNOME or when using gio that uses shared-mime-info... ** Package changed: shared-mime-info (Ubuntu) => kde-cli-tools (Ubuntu) -- You received

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-23 Thread Kai Kasurinen
> dpkg -S /usr/bin/mimetype libfile-mimeinfo-perl: /usr/bin/mimetype > /usr/bin/mimetype --magic-only foo.py foo.py: application/xhtml+xml ** Package changed: kde-cli-tools (Ubuntu) => shared-mime-info (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-23 Thread Sebastien Bacher
it's not a shared-mime-info issue, on a GNOME session the result is right $ xdg-mime query filetype index.py text/x-python ** Package changed: shared-mime-info (Ubuntu) => kde-cli-tools (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-22 Thread Kai Kasurinen
** Package changed: kde-cli-tools (Ubuntu) => shared-mime-info (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1857824 Title: kmimetypefinder5 misidentifies mimetype of python files

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-22 Thread Alex A. D.
Wow. I'm experiencing the same problem. I run the following test case: $ tee index.py http://www.w3.org/1999/xhtml;> Example title Example body """ print('Hello, world!') eol $ kmimetypefinder5 index.py # =>

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-09-22 Thread Alex A. D.
Is this still relevant? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1857824 Title: kmimetypefinder5 misidentifies mimetype of python files containing certain strings To manage notifications

[Bug 1857824] Re: kmimetypefinder5 misidentifies mimetype of python files containing certain strings

2020-02-16 Thread Nathaniel Beaver
Upstream bug report: https://bugs.kde.org/show_bug.cgi?id=417761 ** Bug watch added: KDE Bug Tracking System #417761 https://bugs.kde.org/show_bug.cgi?id=417761 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.