USN notification service is failing to detect affected binary packages if dpkg.list file is present and binary contains arch specifier

Bug #1930105 reported by Emilia Torino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
review-tools
Fix Released
High
Emilia Torino

Bug Description

Some special snaps could ship a dpkg.list file (e.g. core snaps). If that's the case, review-tools adds each of the binaries present in such file, as stage-packages in a "faked-by-review-tools-dpkg" fake part. Those binaries are then inspected against the USN db to detect security updates affecting them.

Under certain circumstances, the binary name in the dpkg.list entry could contain an architecture specifier as part of the binary name (e.g liblz4-1:amd64). The review-tools is not considering such situation and is setting the binary name as liblz4-1:amd64 when it should be liblz4-1 only.

This issue makes the the USN notification service to fail detect USNs affecting such binary packages as it uses binary names to compare.

$ review-tools.check-notices core18_2066.snap
{
  "core18": {
    "2066": {}
  }
}

With 2021/05/27 USN DB it should report:
{
  "isc-dhcp-client": [
    "4969-1"
  ],
  "liblz4-1": [
    "4968-1"
  ]
}

There is a related bug which is related to the presence of an empty primed-stage-packages: [] in the snap manifest which also affects this result: https://bugs.launchpad.net/review-tools/+bug/1930106. Both bugs need to be resolved together for this result to be properly provided.

Related branches

summary: - USN notification service if failing to detect affected binary packages
+ USN notification service is failing to detect affected binary packages
if dpkg.list file is present and binary contains arch specifier
description: updated
Changed in review-tools:
assignee: nobody → Emilia Torino (emitorino)
status: New → Confirmed
Changed in review-tools:
status: Confirmed → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.