migrate advise-snap --from-apt to APT JSON hooks 0.2

Bug #1925787 reported by Julian Andres Klode
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Michael Vogt

Bug Description

APT has gained a new JSON hook protocol version, 0.2, and 0.1 is deprecated with a warning in impish (as of apt 2.3.2)

* (incompatible change) The mode flag of arguments gained upgrade, downgrade, reinstall modes. All of these are install
* (compatible change) The hooks org.debian.apt.hooks.install.package-list and org.debian.apt.hooks.install.statistics have been added
* (compatible change) Version objects gained a new origins array

I believe given the scope of the snapd integration, it can just negotiate 0.2 protocol with 0.2 servers and 0.1 with 0.1 servers and not need further changes.

0.2 protocol support will be available first in impish and xenial for the new ESM hooks, however, the warning is only in impish. It is advisable to continue shipping 0.1 support for the foreseeable future in snapd.

Revision history for this message
Julian Andres Klode (juliank) wrote :
summary: - snapd migrate to APT hooks 0.2
+ migrate advise-snap --from-apt to APT JSON hooks 0.2
Revision history for this message
Julian Andres Klode (juliank) wrote :

Please also fix the hook to accept multiple requests between the hello and bye method. The goal has always been to start the hook just once and then call it multiple times, and this breaks with current snapd.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Never mind the multiple requests thing, it's not going to work at the moment anyway, because it's using async notifications rather than waiting for the hook to answer. So that needs a 0.3 protocol :)

Anyhow, negotiating 0.2 shouldn't be too hard. If you see 0.2 in the versions list, respond back with 0.2 instead of 0.1.

Revision history for this message
Julian Andres Klode (juliank) wrote :

This blocks apt in impish from migrating.

Changed in snapd (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
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.