Merge ~fourdollars/pc-enablement/+git/oem-scripts:master into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master

Proposed by Shih-Yuan Lee
Status: Merged
Approved by: Yuan-Chen Cheng
Approved revision: 58b75306ae7184fdb0cf07ff58b42ec1108e0884
Merged at revision: 9f591a49a97647247fd1049d12d532827e626a6b
Proposed branch: ~fourdollars/pc-enablement/+git/oem-scripts:master
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 100 lines (+34/-3)
4 files modified
debian/changelog (+9/-0)
debian/tests/launchpad-api (+6/-0)
launchpad-api (+4/-1)
mir-bug (+15/-2)
Reviewer Review Type Date Requested Status
Yuan-Chen Cheng (community) Approve
Review via email: mp+407299@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

[BOT]
$ cat oem-scripts-1.9-58b7530-in-docker-focal-summary.log
autopkgtest-collect-credentials PASS
autopkgtest-oem-scripts-auto PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
jq-lp PASS
launchpad-api PASS
lp-bug PASS
oem-meta-packages PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
mir-bug SKIP exit status 77 and marked as skippable
git-url-insteadof-setting PASS
lp-dl-attm PASS
recovery-from-iso.sh PASS
mir-bug-verification PASS
https://paste.ubuntu.com/p/3K8fwd6Nzb/ oem-scripts-1.9-58b7530-in-docker-focal-complete.log

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) 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 38037d5..9c26c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1oem-scripts (1.9) UNRELEASED; urgency=medium
2
3 * mir-bug: Support the oem-needs-upload and oem-done-upload tags.
4 * debian/tests/launchpad-api,
5 launchpad-api: Correct the return code when using `launchpad-api get`
6 failed.
7
8 -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Wed, 18 Aug 2021 14:30:31 +0800
9
1oem-scripts (1.8) focal; urgency=medium10oem-scripts (1.8) focal; urgency=medium
211
3 * debian/tests/mir-bug,12 * debian/tests/mir-bug,
diff --git a/debian/tests/launchpad-api b/debian/tests/launchpad-api
index ff71689..d1b4909 100644
--- a/debian/tests/launchpad-api
+++ b/debian/tests/launchpad-api
@@ -2,7 +2,13 @@
22
3export LAUNCHPAD_API="https://api.staging.launchpad.net/"3export LAUNCHPAD_API="https://api.staging.launchpad.net/"
44
5# LP: #2 doesn't exist so it should return failed.
6if launchpad-api get bugs/2 2>&1; then
7 exit 1
8fi
9
5launchpad-api patch bugs/100 tags:='["focal"]'10launchpad-api patch bugs/100 tags:='["focal"]'
11
6if [ "$(launchpad-api get bugs/100 | jq -r '.tags|join(" ")')" != "focal" ]; then12if [ "$(launchpad-api get bugs/100 | jq -r '.tags|join(" ")')" != "focal" ]; then
7 exit 113 exit 1
8fi14fi
diff --git a/launchpad-api b/launchpad-api
index aa4001e..e6f958c 100755
--- a/launchpad-api
+++ b/launchpad-api
@@ -31,6 +31,9 @@ usage_auth_failed()
31It could be command error OR your authentication token is removed or expired.31It could be command error OR your authentication token is removed or expired.
32If you think it's the authentication issue, you can try to backup/remove32If you think it's the authentication issue, you can try to backup/remove
33the config.ini, get authentication token and try again.33the config.ini, get authentication token and try again.
34If it still failed, it could be a server side issue.
35
36launchpad-api is just a shell script wrapper for https://api.launchpad.net/.
3437
35Ex:38Ex:
3639
@@ -124,7 +127,7 @@ get_api()
124 oauth_timestamp=="$(date +%s)" \127 oauth_timestamp=="$(date +%s)" \
125 oauth_token=="${oauth_token}" \128 oauth_token=="${oauth_token}" \
126 oauth_version=="1.0" \129 oauth_version=="1.0" \
127 "$@" || ( usage_auth_failed ; usage )130 "$@" || ( usage_auth_failed ; usage ; false )
128}131}
129132
130patch_api()133patch_api()
diff --git a/mir-bug b/mir-bug
index 715aac1..74ec3c2 100755
--- a/mir-bug
+++ b/mir-bug
@@ -456,7 +456,12 @@ def update_bug(
456 if check_bug_tags(bug, certified) is False:456 if check_bug_tags(bug, certified) is False:
457 tags = copy(bug.tags)457 tags = copy(bug.tags)
458 if certified:458 if certified:
459 taglist = TAG_LIST + ["ubuntu-certified"]459 if args.release:
460 taglist = TAG_LIST + ["ubuntu-certified", "oem-done-upload"]
461 elif args.ready:
462 taglist = TAG_LIST + ["ubuntu-certified", "oem-needs-upload"]
463 else:
464 taglist = TAG_LIST + ["ubuntu-certified"]
460 else:465 else:
461 taglist = TAG_LIST466 taglist = TAG_LIST
462 for tag in taglist:467 for tag in taglist:
@@ -470,6 +475,9 @@ def update_bug(
470 if tag[len("oem-scripts-") :] != oem_scripts.__version__:475 if tag[len("oem-scripts-") :] != oem_scripts.__version__:
471 if yes_or_ask(yes, f"Do you want to remove '{tag}' tag?"):476 if yes_or_ask(yes, f"Do you want to remove '{tag}' tag?"):
472 tags.remove(tag)477 tags.remove(tag)
478 elif certified and args.release and tag == "oem-needs-upload":
479 if yes_or_ask(yes, f"Do you want to remove '{tag}' tag?"):
480 tags.remove(tag)
473 if tags != bug.tags:481 if tags != bug.tags:
474 bug.tags = tags482 bug.tags = tags
475483
@@ -786,7 +794,12 @@ def check_bug_tags(bug, certified: bool = False) -> bool:
786 info("Checking bug tags...")794 info("Checking bug tags...")
787 result = True795 result = True
788 if certified:796 if certified:
789 taglist = TAG_LIST + ["ubuntu-certified"]797 if args.release:
798 taglist = TAG_LIST + ["ubuntu-certified", "oem-done-upload"]
799 elif args.ready:
800 taglist = TAG_LIST + ["ubuntu-certified", "oem-needs-upload"]
801 else:
802 taglist = TAG_LIST + ["ubuntu-certified"]
790 else:803 else:
791 taglist = TAG_LIST804 taglist = TAG_LIST
792 for tag in taglist:805 for tag in taglist:

Subscribers

People subscribed via source and target branches