https://bugs.kde.org/show_bug.cgi?id=528037
Bug ID: 528037
Summary: Install button stuck on "Loading…" when opening a
local RPM while packagekitd is not running;
GetDetailsLocal is never requested
Classification: Applications
Product: Discover
Version First unspecified
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: PackageKit
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
SUMMARY
Opening a local .rpm while packagekit.service is inactive (e.g. after its
normal idle exit) shows the package page, but the Install button stays disabled
on "Loading…" indefinitely. Author/License show "Unknown" and no description
loads. Closing Discover and opening the same file again works immediately,
because packagekitd is now running.
STEPS TO REPRODUCE
1. Close Discover and make sure PackageKit is not running:
sudo systemctl stop packagekit
2. plasma-discover /path/to/any-local.rpm
3. Wait (I waited 90+ seconds).
4. Close Discover and repeat step 2.
OBSERVED RESULT
Step 2: the page renders with the file path and size, but Install stays on
"Loading…" indefinitely.
Step 4: Install becomes available right away.
The PackageKit journal (journalctl -u packagekit) shows that on the cold start
Discover never sends get-details-local or get-files-local at all. Only
resolve/refresh-cache/get-updates appear:
08:42:27 PackageKit: daemon start
08:42:29 systemd: Started packagekit.service
08:42:30 resolve transaction ... finished with success
08:42:31 resolve transaction ... finished with success
(no get-details-local / get-files-local afterwards)
On the warm second attempt they are sent immediately:
08:22:53 get-details-local transaction ... finished with success after 7ms
08:22:53 get-files-local transaction ... finished with success after 10ms
EXPECTED RESULT
Local package details are fetched once PackageKit is available, and Install
becomes usable on the first launch.
SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44 (KDE Plasma)
Discover: 6.7.5 (plasma-discover-6.7.5-2.fc44)
KDE Frameworks: 6.31.0
Qt: 6.11.2
Kernel: 7.2.13-200.fc44.x86_64
Graphics Platform: Wayland
PackageKit 1.4.0 (dnf5 backend), PackageKit-Qt6 1.1.4
ADDITIONAL INFORMATION
Likely cause, from reading the code (not verified in a debugger):
LocalFilePKResource::fetchDetails() marks details as "fetching" before checking
PackageKit::Daemon::roles():
m_details.insert(QStringLiteral("fetching"), true); // we add an entry so
it's not re-fetched.
if (PackageKit::Daemon::roles() &
PackageKit::Transaction::RoleGetDetailsLocal) { ... getDetailsLocal(...) ... }
if (PackageKit::Daemon::roles() &
PackageKit::Transaction::RoleGetFilesLocal) { ... getFilesLocal(...) ... }
PackageKit-Qt fills Daemon::roles() asynchronously
(DaemonPrivate::getAllProperties() -> callWithCallback -> updateProperties).
While packagekitd is still being D-Bus-activated, roles() appears to be 0 when
the page first calls fetchDetails(). Both checks then fail, no transaction is
created, and every later call returns early because m_details is no longer
empty. The resource stays in the Broken state, so InstallApplicationButton
shows "Loading…".
A possible fix: don't set the "fetching" marker when roles() is 0, and instead
retry once roles are known (e.g. on PackageKit::Daemon::changed /
isRunningChanged).
--
You are receiving this mail because:
You are watching all bug changes.