Merge ~litios/ubuntu-cve-tracker:sis-changes-forget-binaries into ubuntu-cve-tracker:master

Proposed by David Fernandez Gonzalez
Status: Merged
Merged at revision: 7408a55d2de9501b5e57de61d540c409c0fbdc7d
Proposed branch: ~litios/ubuntu-cve-tracker:sis-changes-forget-binaries
Merge into: ubuntu-cve-tracker:master
Diff against target: 12 lines (+1/-0)
1 file modified
scripts/sis-changes (+1/-0)
Reviewer Review Type Date Requested Status
Alex Murray Approve
Review via email: mp+443737@code.launchpad.net

Description of the change

During the gathering of package information for the USN script generation, when specifying several PPAs, there is a check to always use the most up-to-date version (line 238). The pkg struct is reset to the default state, so everything is regenerated according to this newer version.

Nevertheless, the binaries are not reset. The information is added with the `setdefault` function, so if it already exists, it is not overridden (line 419).

This situation happens when publishing an ESM update when the same package is on the security proposed PPA. The source information in the USN is added from the ESM PPA but the binary information is added from the security proposed PPA. Example:

usn.py --db "$DB" $USN --release bionic --package jhead --source-version 1:3.00-8~ubuntu0.2+esm1
usn.py --db "$DB" $USN --release focal --package jhead --source-version 1:3.04-1ubuntu0.2+esm1
usn.py --db "$DB" $USN --release jammy --package jhead --source-version 1:3.06.0.1-2ubuntu0.22.04.1+esm1
[...]
usn.py --db "$DB" $USN --release bionic --package jhead --binary-version 1:3.00-8~ubuntu0.2 --pocket security
usn.py --db "$DB" $USN --release focal --package jhead --binary-version 1:3.04-1ubuntu0.2 --pocket security
usn.py --db "$DB" $USN --release jammy --package jhead --binary-version 1:3.06.0.1-2ubuntu0.22.04.1 --pocket security

To follow the same logic as what's already done in line 238, this PR also cleans the binaries when it detects there is a newer version.

Thanks @iosifache for detecting the issue!

To post a comment you must log in.
Revision history for this message
Alex Murray (alexmurray) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/sis-changes b/scripts/sis-changes
2index bf50c92..db82bf4 100755
3--- a/scripts/sis-changes
4+++ b/scripts/sis-changes
5@@ -237,6 +237,7 @@ def load_pkg_details_from_lp(archive, pkgs, binaries, pkg, item):
6 else:
7 print("Forgetting %s: %s %s (now have %s)" % (rel, pkg, pkgs[pkg][rel]['source']['version'], version), file=sys.stderr)
8 pkgs[pkg][rel] = dict()
9+ binaries[pkg][rel] = dict()
10 pkgs.setdefault(pkg, dict())
11 pkgs[pkg].setdefault(rel, dict())
12 if opt.debug:

Subscribers

People subscribed via source and target branches