Bug 478759 - Support 'short' format for classic ostree ref, omitting the remote (default)
Summary: Support 'short' format for classic ostree ref, omitting the remote (default)
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: rpm-ostree Backend (show other bugs)
Version: master
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-20 10:07 UTC by Timothée Ravier
Modified: 2024-10-18 15:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothée Ravier 2023-12-20 10:07:30 UTC
SUMMARY

Support 'short' format for classic ostree ref, omitting the remote (default): fedora/39/x86_64/kinoite instead of fedora:fedora/39/x86_64/kinoite

STEPS TO REPRODUCE
1.  Rebase to fedora/39/x86_64/kinoite on Kinoite
2. rpm-ostree backend exists with an error.

OBSERVED RESULT

rpm-ostree backend exists with an error.

EXPECTED RESULT

rpm-ostree backend works.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora
KDE Plasma Version: 5.27.10
Comment 1 Timothée Ravier 2023-12-20 11:06:38 UTC
Copied from chat to preserver history:

We need a new branch in the Classic case: https://invent.kde.org/plasma/discover/-/blob/master/libdiscover/backends/RpmOstreeBackend/OstreeFormat.cpp?ref_type=heads#L21

Then we need to add the logic to figure out what the default remote is otherwise it's going to fail later.

Another short term workaround (as we're the only users of this code) is to hardcode "fedora" as origin if it's not there. It's what's done already in some other places.
Comment 2 Timothée Ravier 2023-12-22 11:35:16 UTC
Git commit d590508957e20982f451238cbfa51a6f54674353 by Timothée Ravier, on behalf of Tushar Hero.
Committed on 22/12/2023 at 12:28.
Pushed by ravier into branch 'merge-requests/723/head'.

rpm-ostree: Add additional case for classic ostree image format

See: https://bugs.kde.org/show_bug.cgi?id=478759

M  +16   -6    libdiscover/backends/RpmOstreeBackend/OstreeFormat.cpp

https://invent.kde.org/plasma/discover/-/commit/d590508957e20982f451238cbfa51a6f54674353
Comment 3 Bug Janitor Service 2023-12-22 12:47:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/725
Comment 4 Bug Janitor Service 2024-10-08 21:43:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/958
Comment 5 Timothée Ravier 2024-10-18 15:12:39 UTC
Git commit b4e9b6b3fe1c8820670cc0620db9860c75021aee by Timothée Ravier.
Committed on 17/10/2024 at 08:17.
Pushed by ravier into branch 'master'.

rpm-ostree: Gracefully handle unknown ostree refs formats

In some unusual setups (reference imported locally or unencapsulated
from a container), we may not have an origin for the ostree commits.
Handle that gracefully and do not trigger any update checks as those
won't make sense nor succeed.

See:
- https://invent.kde.org/plasma/discover/-/merge_requests/723
- https://invent.kde.org/plasma/discover/-/merge_requests/725

M  +5    -1    libdiscover/backends/RpmOstreeBackend/OstreeFormat.cpp
M  +8    -0    libdiscover/backends/RpmOstreeBackend/RpmOstreeBackend.cpp

https://invent.kde.org/plasma/discover/-/commit/b4e9b6b3fe1c8820670cc0620db9860c75021aee