[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-17 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=433463

--- Comment #13 from Nate Graham  ---
Thanks for the info!

It looks like that appdata file was added when the app was originally packaged
on Flathub 7 years ago, with no explanation. Maybe at the time the project
didn't have one of its own?

Today it looks like the file is largely synced with upstream, with a few
changes, such as adding this disclaimer that it's not packaged by its own
developer:
https://github.com/flathub/org.godotengine.Godot/commit/7c83b27d616d7ac66482bddb176b2ee9dd394f41

And this disclaimer about Flatpak-specific limitations:
https://github.com/flathub/org.godotengine.Godot/commit/5ad29ebe45750b8ac0d07d3f4d623abbe25934d2

So maybe all that's necessary there is changing the ID from
org.godotengine.Godot.desktop to org.godotengine.Godot? Does that make sense?

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-16 Thread Matthias Klumpp
https://bugs.kde.org/show_bug.cgi?id=433463

--- Comment #12 from Matthias Klumpp  ---
Oh, just to add: Component IDs should be matched *exactly*, doing heuristics
was a really bad idea of the past. If an application wants to rename its ID, it
can do so *explicitly* by using a `replaces` block:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-replaces
Of course, if such a hint is there, Discover should follow it and combine the
two components under the new name (if libappstream hasn't done that already). 

Some components use "provides" instead of "replaces", which is a bit
unfortunate (likely from a time before we had a proper replacement mechanism in
AppStream...), but at least this is also explicit and no error-prone heuristics
are happening.

If any duplicate apps happen, those issues should be fixed by the distributors
(Flathub, Debian/Fedora/OpenSUSE/Ubuntu/etc) or by the respective upstreams by
either fixing the ID or by adding any missing `replaces` tags.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-16 Thread Matthias K.
https://bugs.kde.org/show_bug.cgi?id=433463

Matthias K.  changed:

   What|Removed |Added

 CC||matth...@tenstral.net

--- Comment #11 from Matthias K.  ---
To make one thing super clear: This *must not* be fixed in Discover, and it
also *must not* be addressed in AppStream either. No entity except for the
upstream project and, in rare cases, the packager, should ever mess with the
component ID. A lot of stuff is tied to it, changing is basically means
renaming the project, and stripping a bunch of associated metadata. We also
have pretty bad history with messing with component IDs, causing a ton of
issues (so, the only place we touch them in distributions is when there is no
MetaInfo file and an ID is synthesized).

For the issue at hand, this is a weird one! I was looking at this using the
Debian package, since that's the distro I use.
On Debian, the component has the ID `org.godotengine.Godot`, so I thought maybe
we rename it in the package! Turns out, that is not the case:
https://salsa.debian.org/debian/godot3/-/blob/master/debian/rules?ref_type=heads#L97

So, Debian just ships the metaInfo file that upstream provides, which has the
`org.godotengine.Godot` ID. So, looking at the Flatpak recipe, for some reason
Flatpak does *not* use the upstream-provided MetaInfo file, but provides its
own one! And look at that:
https://github.com/flathub/org.godotengine.Godot/blob/master/org.godotengine.Godot.appdata.xml#L3
=> It has the "wrong" ID, diverging from upstream! Funnily enough, the Flatpak
itself is named `org.godotengine.Godot`, so I see no reason at all for this
weird diversion... Maybe it had something to do with appstream-glib in the past
before Flatpak switched to libappstream, but that would be odd...

In any case, this goes completely against what MetaInfo files are designed for,
upstream is supposed to provide them, and packagers may only provide one if
upstream doesn't have one.

So, tl;dr, this is not a Discover bug or AppStream or Flatpak bug, but a bug in
the Flatpak bundle. IMHO the downstream MetaInfo file should just be deleted
and the one from upstream should be used instead, that's what it's for! (and if
anything is missing, just contribute the metadata upstream!)
At the very least, the component ID should be harmonized with what upstream
ships though.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-16 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=433463

--- Comment #10 from Nate Graham  ---
That one I can't answer. Maybe Matthias Klumpp can weigh in.

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-15 Thread Harald Sitter
https://bugs.kde.org/show_bug.cgi?id=433463

--- Comment #9 from Harald Sitter  ---
Also, why would we implement this on a discover level rather than on a
libappstream level?

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-15 Thread Harald Sitter
https://bugs.kde.org/show_bug.cgi?id=433463

--- Comment #8 from Harald Sitter  ---
Which one is the one that should be shown?

-- 
You are receiving this mail because:
You are watching all bug changes.

[Discover] [Bug 433463] Discover should de-duplicate apps whose AppStream IDs differ only by the presence or absence of the ".desktop" suffix

2024-05-14 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=433463

Nate Graham  changed:

   What|Removed |Added

   Severity|normal  |wishlist
 Status|NEEDSINFO   |CONFIRMED
 Resolution|WAITINGFORINFO  |---
Summary|org.godotengine.Godot.deskt |Discover should
   |op is not de-duplicated |de-duplicate apps whose
   |with org.godotengine.Godot  |AppStream IDs differ only
   ||by the presence or absence
   ||of the ".desktop" suffix

--- Comment #7 from Nate Graham  ---
Clearly their appstream IDs differ (org.godotengine.Godot vs
org.godotengine.Godot.desktop) but my point is that Discover is being too
strict here, and should consider IDs to be matching if they differ only by the
presence or absence of the ".desktop" suffix. This is an optional thing that
was used for years and still accepted by the spec, so I don't think we're
gaining anything here by being strict. Changing to wishlist.

-- 
You are receiving this mail because:
You are watching all bug changes.