PackageKit / PackageKit

A D-BUS abstraction layer that allows the user to manage packages in a secure way using a cross-distro, cross-architecture API.
https://www.freedesktop.org/software/PackageKit/
GNU General Public License v2.0
259 stars 163 forks source link

Plasma discover fails due to PK enum changes #769

Closed sidt4 closed 5 months ago

sidt4 commented 5 months ago

While testing https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/2054, just wanted to double check if other PK clients pass.

This was from Ubuntu 23.10 (all updates installed) to 24.04.

Error log:

discover.update.error.txt

Screenshots (with enum change):

plasma-discover-pk-error-1 plasma-discover-pk-error-2

Screenshots (without enum change):

Proceeds with update.

plasma-discover-pk-success

sidt4 commented 5 months ago

I know this bug should be filed elsewhere in KDE. But, I've already spent a lot of time trying to reproduce this issue in KDE environment (which is totally new to me), and would rather report it somewhere before this got out of my radar.

sidt4 commented 5 months ago

The below patch would be handy to reproduce this issue as KDE Discover tries to download changelog of 2K+ packages which takes a huge amount of time.

--- a/backends/apt/apt-job.cpp
+++ b/backends/apt/apt-job.cpp
@@ -894,13 +894,7 @@ void AptJob::stageUpdateDetail(GPtrArray *updateArray, const pkgCache::VerIterat

         // fetch the changelog
         pk_backend_job_set_status(m_job, PK_STATUS_ENUM_DOWNLOAD_CHANGELOG);
-        changelog = fetchChangelogData(*m_cache,
-                                       fetcher,
-                                       candver,
-                                       currver,
-                                       &update_text,
-                                       &updated,
-                                       &issued);
+        changelog = "";
     }

     // Check if the update was updates since it was issued
ximion commented 5 months ago

Can you report this against KDE Discover please? This change really is annoying, and tbh, in hindsight it would probably have been better to do it with a complete API/DBus interface break and split the PkInfoEnum. But we can adjust this in Discover :-)

sidt4 commented 5 months ago

Filed https://bugs.kde.org/show_bug.cgi?id=488219

ximion commented 5 months ago

Nice, thanks! For the record, I have never seen this at all while running the code on my system, but I guess this is pretty much the same case as with GNOME Software.