Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Plasma no longer recognizes HTML files after Perl updates
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 72

PostPosted: Fri Sep 08, 2023 5:11 pm    Post subject: Plasma no longer recognizes HTML files after Perl updates Reply with quote

On monday, I ran emerge -uvaDN world on my computer, which ended up merging 181 packages, most of them related to Perl. Ever since then, Plasma will no longer properly recognize HTML files. When I view the file properties, the MIME-type of those files is given as "application/x-extension-html". I never checked what mimetype it was before, but I'm assuming it was probably "text/html", since that would be the correct mimetype for HTML.

This has a number of negative consequences for me:

- Neither icons nor previews are shown for HTML files any more.

- When I click on an HTML file, it is opened in a hex editor (okteta) instead of a text editor.

- Most importantly for me, I can no longer open HTML files in editable mode inside of kdevelop.

These things all worked earlier on monday, and then broke in the middle of a session, after emerge finished. As far as I can tell, only HTML files are affected, all other filetypes are still recognized just as before.

By manually adding a text editor to the new "application/x-extension-html" file type, I can still edit them in a text editor, but most of the defaults or special behavior that exists for HTML files is just gone or broken.

There is a file /usr/share/mime/text/html.xml on my computer that really looks like it ought to work. According to its mtime, it was definitely written during that round of updates on monday, and then again today after another round of updates, along with most other files in that directory. However, equery belongs comes up with nothing. (Presumbly because it was locally auto-generated after the install of another packages.)

I am out of ideas how to deal with that. Does anybody have any ideas what might be going on here or how to diagnose that further?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1697

PostPosted: Sat Sep 09, 2023 7:32 am    Post subject: Reply with quote

There's a chance this is bug 913854. Could you try dev-perl/MIME-tools-5.510.0-r1 please?

FWIW, /usr/share/mime/text/html.xml is handled by update-mime-database from x11-misc/shared-mime-info.

EDIT: Came across your(?) post on the KDE forums too at https://discuss.kde.org/t/kdevelop-suddenly-will-only-open-html-files-in-read-only-mode/4767 - I also came across some bits at https://community.kde.org/Baloo#Top_bugs_and_feature_requests which are helpful in understanding which components are at play here in KFileMetadata and some known issues with it.

If the issues continue, please try to run file on a HTML file, as well as kmimetypefinder and share their output in full.
Back to top
View user's profile Send private message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 72

PostPosted: Sat Sep 09, 2023 11:46 pm    Post subject: Reply with quote

sam_ wrote:
There's a chance this is bug 913854. Could you try dev-perl/MIME-tools-5.510.0-r1 please?.


I don't have any version of that package installed. I just installed this version with emerge -v1, and having that package installed does not seem to make a difference.

sam_ wrote:
FWIW, /usr/share/mime/text/html.xml is handled by update-mime-database from x11-misc/shared-mime-info.

EDIT: Came across your(?) post on the KDE forums too at https://discuss.kde.org/t/kdevelop-suddenly-will-only-open-html-files-in-read-only-mode/4767


That was indeed my post.

sam_ wrote:
- I also came across some bits at https://community.kde.org/Baloo#Top_bugs_and_feature_requests which are helpful in understanding which components are at play here in KFileMetadata and some known issues with it.


That really was the bug, and the workaround in the linked bug report did solve my problem. For posterity, I ran:

Code:
$ rm ~/.local/share/mime/packages/user-extension-*
$ update-mime-database ~/.local/share/mime


Thank you for the pointers, I would never have found that alone!
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1697

PostPosted: Mon Sep 11, 2023 9:20 pm    Post subject: Reply with quote

Happy to have helped & thanks for the conclusion!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum