-
Notifications
You must be signed in to change notification settings - Fork 178
pk-backend-spawn: Support 'pk_backend_job_details_full()' #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Tested on top of 69cd3a1. This MR will work with python backends which use the old or the new Without
|
357af83 to
a398001
Compare
…e is reported properly This is needed for download size reporting to work in PK clients which use the 'download-size' property (introduced in 3741c68) in 'get-details' response. 'download-size' property is available only when the PK backend uses 'pk_backend_job_details_full()', not otherwise. Fixes: PackageKit#771 Part of: PackageKit#781
1073741824 (1 GiB) size check was added in 2007 commit 6f06e1b. 1 GiB package sizes are very much possible in 2025. From a quick check, Debian has ~10 packages and Solus a few. We now allow the maximum size supported by "gulong" on the platform, beyond which there is nothing much we can do without breaking the API. We don't do any size restriction checks for non-spawned backends, so there is no point doing it here. Fixes the following issue as seen in Solus GNOME: $ pkcon get-details 0ad-data Resolving [=========================] Getting details [=========================] Querying [=========================] Starting [=========================] Finished [=========================] PackageKit logs with error: --------------------------- 08:36:22 PackageKit sending 'get-details 0ad-data;0.27.0-11;x86_64;Solus' 08:36:22 PackageKit failed to parse: details 0ad-data;0.27.0-11;x86_64;Solus Cross-platform, 3D and historically-based real-time strategy game (data files) GPL-2.0-or-later,CCPL games Cross-platform, 3D and historically-based real-time strategy game (data files) https://play0ad.com 3526938164 1368603575: package size cannot be that large With this commit: ----------------- $ pkcon get-details 0ad-data Resolving [=========================] Getting details [=========================] Querying [=========================] Finished [=========================] Package description package: 0ad-data-0.27.0-11.x86_64 summary: Cross-platform, 3D and historically-based real-time strategy game (data files) license: GPL-2.0-or-later,CCPL group: games download size: 1.4 GB (1,368,603,575 bytes) size: 3.5 GB (3,526,938,164 bytes) url: https://play0ad.com description: Cross-platform, 3D and historically-based real-time strategy game (data files)
a398001 to
2525f50
Compare
|
FWIW, this looks good to me. |
|
Partially superseded by 736585f |
|
Right. To be honest, I really had thought we would be able to get rid of spawned backends (at least the generic support) - but now that we're getting another one, I guess that's not the case and we should make sure the current code works. |
|
Yeah the way spawned backends is architectured isn't my favourite tbh. If i gained a bunch of time it'll be interesting to experiment with other approaches. Cython may work. I know ikey was also experimenting with a varlink approach at some point. /offtopic Anyway w.r.t the rest of the existing spawned backends do we just want to emit |
Please refer commit log.
All changes tested on latest Solus GNOME.
Fixes: #771