[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).

 -- Dmitry Shachnev   Sat, 29 May 2021 12:04:21
+0300

** Changed in: qtbase-opensource-src (Ubuntu)
   Status: In Progress => Fix Released

-- 
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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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
https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template).

-- 
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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 them should be picked up."

and there is multiple glob matches:





-- 
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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 one is missing (fdoIterator == mimeDirs.constEnd()).

Furthermore, in Ubuntu 20.10 and 21.04 we are building Qt with -no-
mimetype-database, which makes Qt use *only* the system copy:

https://salsa.debian.org/qt-kde-team/qt/qtbase/-/commit/f0d53be16a31ea55

So I think it is a bug in shared-mime-info only, not in Qt. Do you
agree?

-- 
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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtbase-opensource-src/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 rather reassign to the Qt integration, unsure what the
right component for that is though

** 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 to Ubuntu.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 "test.py" has a mime-type of application/xhtml+xml


[1] https://gitlab.freedesktop.org/xdg/xdgmime
[2] https://freedesktop.org/wiki/Specifications/shared-mime-info-spec/

--

kmimetypefinder5 is just a tiny wrapper over QMimeDatabase [3][4]. So
bug is likely on shared-mime-info or Qt implementation.

[3] 
https://github.com/KDE/kde-cli-tools/blob/master/kmimetypefinder/kmimetypefinder.cpp
[4] https://bugs.freedesktop.org/show_bug.cgi?id=99672

** Bug watch added: freedesktop.org Bugzilla #99672
   https://bugs.freedesktop.org/show_bug.cgi?id=99672

** 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 containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 to Ubuntu.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 # => application/xhtml+xml

The last command outputs wrong type. Seriously, it's a bug. I've the
same problem in a separate bugreport. Checkout:
https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/1890716

-- 
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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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 about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[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.
https://bugs.launchpad.net/bugs/1857824

Title:
  kmimetypefinder5 misidentifies mimetype of python files containing
  certain strings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/1857824/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs