Comment 20 for bug 1920836

Revision history for this message
Chad Smith (chad.smith) wrote :

@robert-ancell and @corradoventu those errors are due to running software-properties-gtk as non-root user on a system that is not attached to any ubuntu-advantage services.

 The /var/lib/ubuntu-advantage/status.json file is only created by a root user via an `sudo ua status` or `sudo ua attach <token>` call. The absence of the file means that the system is not attached to any valid Ubuntu Advantage services, and the logic in softwareproperties/gtk/util.py will still correctly return an empty representation for ubuntu-advantage services as an empty dict {} and the UX dialogs properly direct folks to how to activate ESM in this case.

I mistakenly thought software-properties-gtk is invoked as root user in order to install/update packages. Given that it is invoked as non-root user we can do one of two things:
   1. keep the current implementation which would print messages about missing status.json files knowing that the UX dialogs still behave correctly.
OR
   2. drop the subp call to 'ua' 'status' from utils.py:get_ua_status() because they will never emit the /var/lib/ubuntu-advantage/status.json artifact and also drop the printed messages about No ua status file written as that really only means you are non-root and on an unattached machine.