Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948658 - dispatch-conf can't handle kde-plasma/plasma-mimeapps-list-2 configuration file move
Summary: dispatch-conf can't handle kde-plasma/plasma-mimeapps-list-2 configuration fi...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 948651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-24 14:50 UTC by John R. Graham
Modified: 2025-01-25 10:53 UTC (History)
8 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John R. Graham gentoo-dev 2025-01-24 14:50:26 UTC
The update from kde-plasma/plasma-mimeapps-list version 1 to 2 moves a configuration file from
    /etc/xdg/mimeapps.list/mimeapps.list
to
    /etc/xdg/mimeapps.list

Neither dispatch-conf nor etc-update is able to handle moving the mimeapps.list _file_ to a location where a directory _of the same name_ exists.

Error message from dispatch-conf (when selecting "use-new") is:
dispatch-conf: Error renaming /etc/xdg/._cfg0000_mimeapps.list to /etc/xdg/mimeapps.list: [Errno 21] Is a directory: '/etc/xdg/._cfg0000_mimeapps.list' -> '/etc/xdg/mimeapps.list'; fatal

etc-update fails in a different way, creating an infinite loop continuously offering to update the file each time you tell it to do so.
Comment 1 Fat-Zer 2025-01-25 03:09:03 UTC
/etc/xdg/mimeapps.list is a system-wide config; kde shouldn't hijack it. This file should probably be installed to /etc/xdg/KDE-mimeapps.list, assuming the info on arch wiki[1] is correct.

[1]: https://wiki.archlinux.org/title/XDG_MIME_Applications#mimeapps.list
Comment 2 John R. Graham gentoo-dev 2025-01-25 03:22:14 UTC
(In reply to Fat-Zer from comment #1)
> /etc/xdg/mimeapps.list is a system-wide config; kde shouldn't hijack it.
> This file should probably be installed to /etc/xdg/KDE-mimeapps.list,
> assuming the info on arch wiki[1] is correct.
> 
> [1]: https://wiki.archlinux.org/title/XDG_MIME_Applications#mimeapps.list

A better spec is https://specifications.freedesktop.org/mime-apps-spec/1.0.1/, which is cited by the Gentoo kde-plasma/plasma-mimeapps-list-package as source material, but it agrees with your contention. And I agree: is seems that that the file is misnamed, but this bug is orthogonal to that issue.
Comment 3 Fat-Zer 2025-01-25 03:53:19 UTC
(In reply to John R. Graham from comment #2)
> A better spec is
> https://specifications.freedesktop.org/mime-apps-spec/1.0.1/, which is cited
> by the Gentoo kde-plasma/plasma-mimeapps-list-package as source material,
> but it agrees with your contention. And I agree: is seems that that the file
> is misnamed, but this bug is orthogonal to that issue.

Ok, I've filed in another one to track this: https://bugs.gentoo.org/948681
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 03:59:36 UTC
*** Bug 948651 has been marked as a duplicate of this bug. ***
Comment 5 jospezial 2025-01-25 09:13:20 UTC
After deleting the empty dir
/etc/xdg/mimeapps.list/
dispatch-conf worked.

But update to plasma-mimeapps-list-2 recommended also.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-25 10:53:35 UTC
This is now worked around via the changes in bug 948681.