Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#76421 - [mgba-qt] Duplicate .desktop file

Attached to Project: Community Packages
Opened by Jordan Christiansen (xordspar0) - Friday, 04 November 2022, 17:41 GMT
Last edited by Jonathan Steel (jsteel) - Sunday, 22 January 2023, 15:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jonathan Steel (jsteel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

Starting at mgba commit c6b25f1 [1], first released in 0.10.0, mgba installs its .desktop file to io.mgba.mGBA.desktop. This package used to overwrite that file, but now that the upstream file is renamed, the package script installs a second file, resulting in 2 files in the desktop applications menu.

$ pacman -Q mgba-qt
mgba-qt 0.10.0-1
$ pacman -Ql mgba-qt | grep desktop
mgba-qt /usr/share/applications/io.mgba.mGBA.desktop
mgba-qt /usr/share/applications/mgba-qt.desktop

Also, it looks like both desktop files refer to a io.mgba.mGBA.png icon file that doesn't exist.

$ grep Icon /usr/share/applications/*mgba*
/usr/share/applications/io.mgba.mGBA.desktop:Icon=io.mgba.mGBA
/usr/share/applications/mgba-qt.desktop:Icon=io.mgba.mGBA
$ pacman -Ql mgba-qt | grep png
mgba-qt /usr/share/pixmaps/mgba.png

[1]: https://github.com/mgba-emu/mgba/commit/c6b25f14a33695b71b55a4504949762d805af3c4
This task depends upon

Closed by  Jonathan Steel (jsteel)
Sunday, 22 January 2023, 15:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.10.1-1
Comment by JakobDev (JakobDev) - Monday, 05 December 2022, 22:25 GMT
mgba should install the files in the right directory (https://github.com/mgba-emu/mgba/blob/fec87062ca6a4125d449d145f38a1c6689ba94d6/CMakeLists.txt#L922). Don't know, why this is not happening here.
Comment by Jordan Christiansen (xordspar0) - Tuesday, 06 December 2022, 18:13 GMT
I think the icons not getting installed is related to how the build is broken up into subpackages. The component that those files get installed with is ${BINARY_NAME} [1], which should always be set to mgba [2]. However, we never install a component that's just called mgba, only mgba-sdl, mgba-qt, etc. mgba-qt-specific resources don't have this problem because they explicitly set their component to ${BINARY_NAME}-qt [3].

Maybe it would be better to install all components in a common section and then manually copy the necessary files in each subpackage section. Or maybe the upstream CMakeLists.txt file could be changed to properly track dependencies, but I'm not yet familiar enough with cmake to know how that would work.

[1]: https://github.com/mgba-emu/mgba/blob/fec87062ca6a4125d449d145f38a1c6689ba94d6/CMakeLists.txt#L922
[2]: https://github.com/mgba-emu/mgba/blob/fec87062ca6a4125d449d145f38a1c6689ba94d6/CMakeLists.txt#L19
[3]: https://github.com/mgba-emu/mgba/blob/fec87062ca6a4125d449d145f38a1c6689ba94d6/src/platform/qt/CMakeLists.txt#L311

Loading...