Merge ~calvinmwadime/software-properties:rename-ua-to-pro into software-properties:ubuntu/master

Proposed by Calvin Mwadime Makokha
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 9199198ea8061782ced42d4d33addd0069e2649b
Merged at revision: 9199198ea8061782ced42d4d33addd0069e2649b
Proposed branch: ~calvinmwadime/software-properties:rename-ua-to-pro
Merge into: software-properties:ubuntu/master
Diff against target: 77 lines (+16/-8)
3 files modified
debian/changelog (+8/-0)
debian/control (+1/-1)
softwareproperties/gtk/utils.py (+7/-7)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Nathan Teodosio (community) Approve
Ubuntu Core Development Team Pending
Review via email: mp+463282@code.launchpad.net

Commit message

d/control: Depend on ubuntu-pro-client instead of ubuntu-advantage-tools

From v31, ubuntu-advantage-tools has been renamed to ubuntu-pro-client
The ubuntu-advantage-tools package is now a transitional package

Use `pro` instead of `ua` in utils.py.

To post a comment you must log in.
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Thank you!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 910451f..1d5db8a 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+software-properties (0.99.45) noble; urgency=medium
7+
8+ * softwareproperties/gtk/utils.py: use `pro` instead of `ua`
9+ * d/control: Depend on ubuntu-pro-client instead of ubuntu-advantage-tools
10+ (LP: #2057671)
11+
12+ -- Calvin Mwadime <calvin.mwadime@canonical.com> Thu, 28 Mar 2024 12:35:35 +0300
13+
14 software-properties (0.99.44) noble; urgency=medium
15
16 * Handle backup and restore of deb822 sources (LP: #2053228)
17diff --git a/debian/control b/debian/control
18index a555b21..1c4700f 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -84,7 +84,7 @@ Depends: gir1.2-gtk-3.0,
22 python3-gi,
23 python3-software-properties (= ${binary:Version}),
24 software-properties-common,
25- ubuntu-advantage-tools (>= 27.11~),
26+ ubuntu-pro-client,
27 ubuntu-advantage-desktop-daemon,
28 ubuntu-drivers-common (>= 1:0.9.6),
29 ${misc:Depends},
30diff --git a/softwareproperties/gtk/utils.py b/softwareproperties/gtk/utils.py
31index 6f67f33..465e5bc 100644
32--- a/softwareproperties/gtk/utils.py
33+++ b/softwareproperties/gtk/utils.py
34@@ -79,7 +79,7 @@ def get_ua_status():
35 # status.json will exist on any attached system. It will also be created
36 # by the systemd timer ua-timer which will update UA_STATUS_JSON every 12
37 # hours to reflect current status of UA subscription services.
38- # Invoking `ua status` with subp will result in a network call to
39+ # Invoking `pro status` with subp will result in a network call to
40 # contracts.canonical.com which could raise Timeouts on network limited
41 # machines. So, prefer the status.json file when possible.
42 status_json = ""
43@@ -90,21 +90,21 @@ def get_ua_status():
44 try:
45 # Success writes UA_STATUS_JSON
46 result = subprocess.run(
47- ['ua', 'status', '--format=json'], stdout=subprocess.PIPE
48+ ['pro', 'status', '--format=json'], stdout=subprocess.PIPE
49 )
50 except Exception as e:
51- print("Failed to run `ua status`:\n%s" % e)
52+ print("Failed to run `pro status`:\n%s" % e)
53 return {}
54 if result.returncode != 0:
55 print(
56- "Ubuntu Advantage client returned code %d" % result.returncode
57+ "Ubuntu Pro client returned code %d" % result.returncode
58 )
59 return {}
60 status_json = result.stdout
61 if not status_json:
62 print(
63- "Warning: no Ubuntu Advantage status found."
64- " Is ubuntu-advantage-tools installed?"
65+ "Warning: no Ubuntu Pro Client status found."
66+ " Is ubuntu-pro-client installed?"
67 )
68 return {}
69 try:
70@@ -114,7 +114,7 @@ def get_ua_status():
71 return {}
72 if status.get("_schema_version", "0.1") != "0.1":
73 print(
74- "UA status schema version change: %s" % status["_schema_version"]
75+ "Pro status schema version change: %s" % status["_schema_version"]
76 )
77 return status
78

Subscribers

People subscribed via source and target branches