Merge ~ycheng-twn/pc-enablement/+git/oem-scripts:0002_umadision into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master

Proposed by Yuan-Chen Cheng
Status: Merged
Merged at revision: 041bf599338d75a1c678d98898b71173f5c0eb4a
Proposed branch: ~ycheng-twn/pc-enablement/+git/oem-scripts:0002_umadision
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 98 lines (+51/-3)
5 files modified
debian/changelog (+13/-2)
debian/links (+1/-0)
setup.py (+1/-0)
tests/test_flake8 (+2/-1)
umadision (+34/-0)
Reviewer Review Type Date Requested Status
Shih-Yuan Lee Approve
Review via email: mp+405292@code.launchpad.net

Commit message

add umadision to query debian site with ubuntu distro which is more than 1 time faster.

To post a comment you must log in.
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 378680c..8342b9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,19 @@
1oem-scripts (0.99) UNRELEASED; urgency=medium1oem-scripts (0.99) UNRELEASED; urgency=medium
22
3 [ Yuan-Chen Cheng]
3 * launchpad-api: refine message and add handy test.4 * launchpad-api: refine message and add handy test.
45 * umadision, debian/links, setup.py, tests/test_flake8: add script to
5 -- Yuan-Chen Cheng <yc.cheng@canonical.com> Fri, 04 Jun 2021 13:00:53 +08006 query qa.debian for ubuntu pkg because it response faster.
7
8 [ Jeremy Szu ]
9 * recovery-from-iso.sh: with stella image support.
10 Need to use the image build after pc-stella-cmit-focal-amd64-X00-20210617-1562.iso
11 because the ubuntu recovery needs to support recovery_type=dev.
12 This patch is just for supporting re-deploy, the auto sanity check
13 will be supported in the future.
14 Inject ssh key, nopasswd for automation
15
16 -- Yuan-Chen Cheng <yc.cheng@canonical.com> Wed, 07 Jul 2021 11:37:50 +0800
617
7oem-scripts (0.98) focal; urgency=medium18oem-scripts (0.98) focal; urgency=medium
819
diff --git a/debian/links b/debian/links
index e77a689..327b5c7 100644
--- a/debian/links
+++ b/debian/links
@@ -1,3 +1,4 @@
1/usr/bin/pkg-oem-meta /usr/bin/pkg-somerville-meta1/usr/bin/pkg-oem-meta /usr/bin/pkg-somerville-meta
2/usr/bin/pkg-oem-meta /usr/bin/pkg-stella-meta2/usr/bin/pkg-oem-meta /usr/bin/pkg-stella-meta
3/usr/bin/pkg-oem-meta /usr/bin/pkg-sutton-meta3/usr/bin/pkg-oem-meta /usr/bin/pkg-sutton-meta
4/usr/bin/umadision /usr/bin/dmadision
diff --git a/setup.py b/setup.py
index f944b38..e9054ce 100644
--- a/setup.py
+++ b/setup.py
@@ -61,6 +61,7 @@ Also there is a meta package oem-dev-tools that installs all scripts""",
61 "bug-bind.py",61 "bug-bind.py",
62 "mir-bug",62 "mir-bug",
63 "check-ssid-duplicated.sh",63 "check-ssid-duplicated.sh",
64 "umadision"
64 ],65 ],
65 packages=find_packages(),66 packages=find_packages(),
66 data_files=[("share/oem-scripts", ["config.sh"])],67 data_files=[("share/oem-scripts", ["config.sh"])],
diff --git a/tests/test_flake8 b/tests/test_flake8
index deb8ef0..6447121 100755
--- a/tests/test_flake8
+++ b/tests/test_flake8
@@ -11,4 +11,5 @@ flake8 --ignore E501,W503,E203 \
11 pkg-list \11 pkg-list \
12 pkg-oem-meta \12 pkg-oem-meta \
13 review-merge-proposal \13 review-merge-proposal \
14 setup.py14 setup.py \
15 umadision
diff --git a/umadision b/umadision
15new file mode 10075516new file mode 100755
index 0000000..7694aa4
--- /dev/null
+++ b/umadision
@@ -0,0 +1,34 @@
1#!/usr/bin/python3
2
3import requests
4import sys
5
6
7def usage():
8 print("umadision DEB_PKG_NAME")
9 print("Query qa.debian.org for ubuntu pkg version")
10 print()
11 print("dmadision DEB_PKG_NAME")
12 print("Query qa.debian.org for debian pkg version")
13
14
15if len(sys.argv) != 2:
16 usage()
17 sys.exit(0)
18
19pkg = sys.argv[1]
20dist = "ubuntu"
21if "dmadision" in sys.argv[0]:
22 dist = "debian"
23
24url = f"https://qa.debian.org/madison.php?package={pkg}&table={dist}&text=on"
25
26r = requests.get(url)
27
28if r.status_code == requests.codes.ok:
29 pass
30else:
31 print("Get f{url} failed")
32 sys.exit(-1)
33
34print(r.text)

Subscribers

People subscribed via source and target branches