[Bug]: remote-ls --updates reports up-to-date OCI refs because it ignores deployed Alt-id
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #6875 @Joao-kouznetz による — マージ済み
評価
調査の方向性
app/flatpak-builtins-remote-ls.c の opt_only_updates フィルタから始めてください。このフィルタは現在、リモートのチェックサムをデプロイ済みのコミットとだけ比較しています。flatpak_dir_needs_update_for_commit_and_subpaths() が Alt-id も受け付けている仕組みを確認したうえで、チェックサムがどちらの識別子とも一致する場合は、そのrefを一覧から除外するようにしてください。tests/test-oci-registry.sh を実行します。新しい no-updates-after-install のアサーションがすべての OCI バリアントで成功し、既存の更新チェックも引き続き成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
flatpak remote-ls --updates reports already installed applications and runtimes from an OCI remote as pending updates, while flatpak update correctly reports nothing to update.
This is a focused report of the OCI mismatch also described in #6714, which was closed after discussing the unrelated flatpak list --columns=latest behavior. It also resembles #3748.
Environment
- Fedora Linux 44, x86_64
- Flatpak 1.18.4 (1.18.4-1.fc44)
- Fedora remote:
oci+https://registry.fedoraproject.org - Also reproduced in upstream main at
f2df7b090b69487f812f4ea389edffca0f5a4610using the existing fake OCI registry tests.
Reproduction
With an already updated application installed from the Fedora OCI remote:
flatpak remote-ls --system --updates --columns=app fedora
flatpak update --system org.mozilla.firefox
flatpak info --system org.mozilla.firefox
flatpak remote-info --system fedora org.mozilla.firefox
The first command lists Firefox and five installed Fedora runtimes/extensions on this machine; the update transaction reports nothing to update.
For Firefox 156.0.1:
- Installed OSTree commit:
b306883250448dca17929560c62733e68c612ad4c14dac75e70a0f31cc92e038 - Installed Alt-id:
5346c30ccd813306ff00a515c913335952c4353e32d5ecc344479068a71ab384 - Remote commit:
5346c30ccd813306ff00a515c913335952c4353e32d5ecc344479068a71ab384
Cause and proposed correction
The opt_only_updates filter in app/flatpak-builtins-remote-ls.c compares the remote checksum only against flatpak_deploy_data_get_commit(). OCI remotes return the image digest, which matches the deployed Alt-id instead.
The transaction path already handles both identities in flatpak_dir_needs_update_for_commit_and_subpaths(). The listing should similarly exclude a ref when the checksum equals either its installed commit or Alt-id, preserving the existing origin check.
Regression coverage and validation
A regression test added to tests/test-oci-registry.sh checks:
- No updates immediately after installing an OCI app and runtime.
- Only the app is listed after publishing a genuine new OCI image.
- No updates after applying that update.
Before the fix, the first assertion fails with org.test.Hello and org.test.Platform incorrectly listed. After the fix, all four user/system × HTTP/HTTPS OCI registry variants pass (20 subtests each, 80 total). The locally built fixed CLI also reports zero Fedora updates on the affected installation, versus six with the installed CLI.
Workaround
Use flatpak update to check and apply actual updates rather than treating this OCI remote-ls --updates output as authoritative. The discrepancy can make GNOME Software appear to miss updates even when these particular refs are already current; this report does not establish a GNOME Software defect.
A corresponding patch and regression tests will follow in a PR. I agree to follow the project Code of Conduct.
- 主要言語
- C
- スター
- 5.1k
- フォーク
- 526
- 平均マージ
- 17時間 12分
- マージ済み PR(30日)
- 26
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flatpak/flatpak のほかの issue
-
[Feature request]: remove flatpak.fish completion so the shell's own completions are used対応中かも @Franklin-Qi が 17 日前に担当しました。 オープンenhancement needs triage
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[Feature request]: add support for `xdg-state` filesystem prefix対応中かも @Franklin-Qi が 17 日前に担当しました。 オープンenhancement libflatpak
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
flatpak/flatpak#5958 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
cli enhancement low priority
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
Some flatpak repair strings are not translatable再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1時間未満 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
flatpak/flatpak の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pocoproject/poco#5626 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FujiNetWIFI/fujinet-lib#272 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
facebookincubator/muse-gadget-sdk#301 ·
メンテナーはふだん 2 日以内に返信
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdict対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdocumentation severity: low
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
luainkernel/lunatik#2231 ·
メンテナーはふだん 1 日以内に返信
-
aspect ratio 16:10オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Revivedx/SavageWindRecomp#402 ·
メンテナーはふだん 1 日以内に返信