[Merge] ~chad.smith/software-properties:ua-status-from-json into software-properties:ubuntu/master

Chad Smith mp+411046 at code.launchpad.net
Fri Oct 29 22:30:19 UTC 2021


Testing performed
   1. launched desktop install of Jammy daily desktop images 
   2. confirmed failure path from LP: #1939732

jammy-desktop:~$ dpkg-query --show software-properties-gtk
software-properties-gtk 0.99.13
jammy-desktop:~$ software-properties-gtk 
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'
No ua status file written:
[Errno 2] No such file or directory: '/var/lib/ubuntu-advantage/status.json'

jammy-desktop:~$ sudo cp utils.py /usr/lib/python3/dist-packages/softwareproperties/gtk/utils.py

jammy-desktop:~$ dpkg-query --show software-properties-gtk

# no error on gtk dialog load on absent /var/lib/ubuntu-advantage/status.json
jammy-desktop:~$ [ -f /var/lib/ubuntu-advantage/status.json ] && echo "status.json exists"
jammy-desktop:~$ software-properties-gtk 
# click "Updates" table in dialog and see "Basic Security Maintenance"

# Attach to a subscription
jammy-desktop:~$ ua attach <mytoken>

jammy-desktop:~$ software-properties-gtk 
# no errors
# click "Updates" table in dialog and see "Extended Security Maintenance" with an expiry from my contract: 12/31/1999
# no errors printed to console

# editing _schema_version to print informational messages on CLI
jammy-desktop:~$ sudo sed -i 's/"_schema_version": "0.1"/"_schema_version": "0.3"/' /var/lib/ubuntu-advantage/status.json
jammy-desktop:~$ software-properties-gtk
UA status schema version change: 0.3






-- 
https://code.launchpad.net/~chad.smith/software-properties/+git/software-properties/+merge/411046
Your team Ubuntu Core Development Team is subscribed to branch software-properties:ubuntu/master.




More information about the Ubuntu-reviews mailing list