-
Notifications
You must be signed in to change notification settings - Fork 157
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
PkPackage: Handle all cases for 'update-severity' property #729
Conversation
Fixes the following assertion failures in Debian Stable (12 / bookworm), when there are security updates (e.g firefox) (pkcon:23385): PackageKit-CRITICAL **: 14:13:18.629: pk_package_set_update_severity: assertion 'update_severity == PK_INFO_ENUM_UNKNOWN || update_severity == PK_INFO_ENUM_LOW || update_severity == PK_INFO_ENUM_NORMAL || update_severity == PK_INFO_ENUM_IMPORTANT || update_severity == PK_INFO_ENUM_CRITICAL' failed
On Ubuntu 23.10:
|
That's wild! Thank you for the patch! And more generally, thank you for looking into these issues @sidt4, you are finding a lot of corner cases and oddities and help to address them or even address them directly. That's great work, I really appreciate it a lot! (even though I might not always reply too quickly due to -ETOOMUCHWORK). |
Sure. Thanks! I guess we landed into this issue probably because E.g. I noticed code where we pass |
Yes, this is an incredible mess. Just recently I was talking to people that we would actually need PackageKit 2 to fix/change some core design. But that would be a) disruptive and b) needs a lot of time to work on - and I doubt someone would pay for that work. |
As a starter, you could create a GitHub issue with all the details (broken down into tasks), and maybe folks will pinch in with contributions. |
I think @mcrha made the changes in b30ab47 and 77e0660, which work correctly in DNF backend as DNF has the concept of advisory with proper update type ( Unfortunately, APT backend generates a mix of severity ( backends/apt/apt-job.cpp:if (origin.compare("Backports.org archive") == 0 ||
ends_with(origin, "-backports")) {
state = PK_INFO_ENUM_ENHANCEMENT;
} else if (ends_with(archive, "-security") ||
label.compare("Debian-Security") == 0) {
state = PK_INFO_ENUM_SECURITY;
} else if (ends_with(archive, "-backports")) {
state = PK_INFO_ENUM_ENHANCEMENT;
} else if (ends_with(archive, "-proposed-updates") || ends_with(archive, "-updates-proposed")) {
state = PK_INFO_ENUM_LOW;
} else if (ends_with(archive, "-updates")) {
state = PK_INFO_ENUM_BUGFIX;
} And So, maybe we should add a new property |
This is inline with the Appstream urgency type too. /**
* AsUrgencyKind:
* @AS_URGENCY_KIND_UNKNOWN: Urgency is unknown or not set
* @AS_URGENCY_KIND_LOW: Low urgency
* @AS_URGENCY_KIND_MEDIUM: Medium urgency
* @AS_URGENCY_KIND_HIGH: High urgency
* @AS_URGENCY_KIND_CRITICAL: Critical urgency
*
* The urgency of an #AsRelease
**/
typedef enum {
AS_URGENCY_KIND_UNKNOWN,
AS_URGENCY_KIND_LOW,
AS_URGENCY_KIND_MEDIUM,
AS_URGENCY_KIND_HIGH,
AS_URGENCY_KIND_CRITICAL,
/*< private >*/
AS_URGENCY_KIND_LAST
} AsUrgencyKind; Refer https://github.com/ximion/appstream/blob/main/src/as-release.h#L72-L90 |
Fixes the following assertion failures in Debian Stable (12 / bookworm), when there are security updates (e.g firefox)
(pkcon:23385): PackageKit-CRITICAL **: 14:13:18.629: pk_package_set_update_severity: assertion 'update_severity == PK_INFO_ENUM_UNKNOWN || update_severity == PK_INFO_ENUM_LOW || update_severity == PK_INFO_ENUM_NORMAL || update_severity == PK_INFO_ENUM_IMPORTANT || update_severity == PK_INFO_ENUM_CRITICAL' failed