Discover PackageKit plugin never lists/searches: backend lacks pk_backend_get_repos #2

Open
opened 2026-11-26 18:32:15 -06:00 by OpenWebUI · 1 comment
Member

Symptom

On the live system (pin 9c0031b, backend store path 5365jxpka7k07rm26qyj3rxw818d816r-packagekit-1.4.0-pk-option1), Plasma Discover with --backends packagekit shows 'Nothing found' in the Installed view and '"" was not found in the available sources' in Search. The daemon journal for Discover's session shows ONLY:

get-updates transaction /NN from uid 1000 finished with success

and never emits get-packages or search-name, even after waiting through a full refresh cycle. By contrast, pkgcli resolve firefox / pkgcli list installed / pkgcli search name firefox all return real results, so the Issue #1 entry points themselves are wired correctly.

Root cause

The live libpk_backend_nix.so exports get_details, get_packages, search_names, search_details, get_updates, refresh_cache, install_packages, update_packages, remove_packages (Issue #1 fixed), but does NOT export pk_backend_get_repos / pk_backend_repo_enable / pk_backend_get_distro_tags. Discover's PackageKit plugin enumerates sources (repos) via get_repos before it will populate the Installed list or run a search. A backend with no advertised sources makes Discover treat the session as having zero sources, so it never issues get_packages/search-name; the search UI reports 'not found in the available sources'. get-updates still works because get_updates is supported.

Proposed fix

Implement pk_backend_get_repos (emit at least one synthetic repo for the Nix channel/input, e.g. 'nixpkgs', then pk_backend_finished) and pk_backend_repo_enable (no-op returning success) so Discover sees a source and proceeds to listing/search. get_distro_tags optional (can return the system distro id).

Note

The polkit sources-refresh gate (50-packagekit.rules) was fixed separately in 9c0031b; the prior Discover 'Update Issue' modal is gone. This is a distinct defect: missing get_repos entry points.

## Symptom On the live system (pin 9c0031b, backend store path 5365jxpka7k07rm26qyj3rxw818d816r-packagekit-1.4.0-pk-option1), Plasma Discover with --backends packagekit shows 'Nothing found' in the Installed view and '"<term>" was not found in the available sources' in Search. The daemon journal for Discover's session shows ONLY: get-updates transaction /NN from uid 1000 finished with success and never emits get-packages or search-name, even after waiting through a full refresh cycle. By contrast, `pkgcli resolve firefox` / `pkgcli list installed` / `pkgcli search name firefox` all return real results, so the Issue #1 entry points themselves are wired correctly. ## Root cause The live libpk_backend_nix.so exports get_details, get_packages, search_names, search_details, get_updates, refresh_cache, install_packages, update_packages, remove_packages (Issue #1 fixed), but does NOT export pk_backend_get_repos / pk_backend_repo_enable / pk_backend_get_distro_tags. Discover's PackageKit plugin enumerates sources (repos) via get_repos before it will populate the Installed list or run a search. A backend with no advertised sources makes Discover treat the session as having zero sources, so it never issues get_packages/search-name; the search UI reports 'not found in the available sources'. get-updates still works because get_updates is supported. ## Proposed fix Implement pk_backend_get_repos (emit at least one synthetic repo for the Nix channel/input, e.g. 'nixpkgs', then pk_backend_finished) and pk_backend_repo_enable (no-op returning success) so Discover sees a source and proceeds to listing/search. get_distro_tags optional (can return the system distro id). ## Note The polkit sources-refresh gate (50-packagekit.rules) was fixed separately in 9c0031b; the prior Discover 'Update Issue' modal is gone. This is a distinct defect: missing get_repos entry points.
Author
Member

See #3 - closing note. The get_repo_list/repo_enable entry points from this issue are implemented and deployed (fork b39054e). After deploying, the polkit sources-refresh gate now grants and refresh-cache succeeds, but Discover still lists/searches nothing because its PackageKit plugin sources results from an on-disk AppStream pool (AppStream::ConcurrentPool), which is empty on NixOS. That is a distribution-layer AppStream metadata gap, tracked in #3 and affecting GNOME Software and other AppStream frontends too. This entry-point gap is resolved; #3 is the remaining work.

See #3 - closing note. The get_repo_list/repo_enable entry points from this issue are implemented and deployed (fork b39054e). After deploying, the polkit sources-refresh gate now grants and refresh-cache succeeds, but Discover still lists/searches nothing because its PackageKit plugin sources results from an on-disk AppStream pool (AppStream::ConcurrentPool), which is empty on NixOS. That is a distribution-layer AppStream metadata gap, tracked in #3 and affecting GNOME Software and other AppStream frontends too. This entry-point gap is resolved; #3 is the remaining work.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Public/packagekit-flake#2
No description provided.