Nix backend: get_packages / search / resolve return empty (desc function pointers not wired) #1
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?
Summary
The Discover PackageKit backend re-enablement (overlay adding
packagekit-qttokdePackages.discover) is complete and deployed, and the daemon loads thenixbackend correctly. However, package enumeration through the fork's Nix backend returns no results. The PackageKit daemon logs an assertion failure on every list/search/resolve query:In the Discover GUI this surfaces as an "Update Issue: There was an issue during the update or installation process" dialog on the Updates page, and empty results on search/list pages.
Confirmed working
excludeDependencies = [ "packagekit-qt" ]inpkgs/kde/plasma/discover/default.nix. Ournixpkgs.overlaysinpk-managed.nixre-addspackagekit-qttokdePackages.discover.buildInputs, producing a Discover that containspackagekit-backend.so(proven build:discover-6.8.2).lib/packagekit-backend/libpk_backend_nix.soplusbin/pkgcli(note: nopkcon).pkgcli backendagainst the live daemon reports:Backend: nixDescription: Nix - the purely functional package managerRoles: cancel;get-details;get-packages;get-updates;install-packages;refresh-cache;remove-packages;resolve;search-details;search-name;update-packages;get-old-transactions/etc/PackageKit/PackageKit.confhasDefaultBackend=nixandmanaged-helperset topk-nix-managed-helper.bin/plasma-discover), renders, and connects to the daemon over D-Bus.The gap
Even though
pkgcli backendadvertises theget-packages/resolve/search-*roles, the runningpackagekitdasserts thatbackend->desc->get_packages,search_details, andresolveare NULL. So thePkBackendDescthatlibpk_backend_nix.soprovides is not wiring those function pointers, despite the backend binary containing the worker symbols (nix_get_updates_thread,nix_search_thread,nix_install_thread,nix_remove_thread,nix_refresh_thread,nix_get_user_profile,nix_run_managed_helper). Net effect: queries hit the assertion and return zero packages.Repro
With the system on
DefaultBackend=nixand the daemon active:Journal:
journalctl -u packagekitshows thebackend->desc->* != NULLassertions.Suspected cause / next step
In the Nix backend source (
pk_backend_nix.cc), thePkBackendDescreturned bybackend_get_description()(or set inpk_backend_create) needssetGetPackages,setResolve,setSearchDetails/setSearchName, etc. to point at the existingnix_*_threaddispatchers (each should callpk_backend_run_joblike the other backends do). Verify the description object actually invokes these setters; the role strings baked into the.somay come from a different code path than the runtimedescstruct.Scope note
This is the fork backend implementation, not the Discover packaging. The packaging fix (the
packagekit-qtoverlay inpk-managed.nix) is correct and verified; this issue tracks only the fork's Nix backend serving package queries.Environment
discover-6.8.2(withpackagekit-backend.soandflatpak-backend.soboth present)packagekit-1.4.0-pk-option1(providespkgcli,libpk_backend_nix.so,pk-nix-managed-helper)flake.lockbump of the packagekit input +rebuild.ymlswitch(run succeeded)