Bug 416283 - appstream uri alt ids
Summary: appstream uri alt ids
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.17.0
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-15 10:04 UTC by Harald Sitter
Modified: 2020-01-17 14:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2020-01-15 10:04:09 UTC
https://github.com/ximion/appstream/issues/183 saw the introduction of extra query arguments through which alternative (legacy) ids may be communicated. So `appstream:org.kde.krita?alt=krita.desktop` will allow modern systems to use the modern id while old systems can find it by alt id.

AppStreamUtils::appstreamId seems to not yet implement this. I also want to note that when updating the logic you should take care to keep ignoring invalid inputs. e.g. `appstream:org.kde.krita?alt=krita.desktop&randomparam=yes` should ignore randomparam rather than stumble over it (this is to ensure future updates to the URI format will not break assumptions)
Comment 1 Aleix Pol 2020-01-17 14:56:44 UTC
Git commit 9101a2d299a235e6b478792e246e4660f3586317 by Aleix Pol.
Committed on 17/01/2020 at 14:56.
Pushed by apol into branch 'Plasma/5.18'.

appstream: support appstream uri alt ids

M  +9    -2    libdiscover/appstream/AppStreamUtils.cpp
M  +1    -1    libdiscover/appstream/AppStreamUtils.h
M  +6    -6    libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
M  +10   -7    libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
M  +59   -38   libdiscover/backends/SnapBackend/SnapBackend.cpp
M  +7    -0    libdiscover/backends/SnapBackend/SnapBackend.h

https://commits.kde.org/discover/9101a2d299a235e6b478792e246e4660f3586317