Discover PackageKit plugin never lists/searches: backend lacks pk_backend_get_repos #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 firefoxall 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.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.