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: Shih-Yuan Lee
Approved revision: 9e7b4bebb8c509d06e73a6abf4a06694597b313f
Merged at revision: 07623a23e1d403bb22cc7867d85928d3527be05d
Proposed branch: ~fourdollars/pc-enablement/+git/oem-scripts:master
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 31 lines (+13/-2)
1 file modified
mir-bug (+13/-2)
Reviewer Review Type Date Requested Status
Kai-Chuan Hsieh Approve
Review via email: mp+439300@code.launchpad.net

Description of the change

Without this commit, it acts like https://pastebin.ubuntu.com/p/ZR6C9hrWGP/.
With this commit, it will act like https://pastebin.ubuntu.com/p/PxhY8ywtGX/.

It is majorly to avoid the following messages when releasing the OEM metapackage.

<WARNING> oem-somerville-mewtwo-meta_20.04~ubuntu1.debdiff - https://bugs.launchpad.net/bugs/1920193/+attachment/5656147 has unexpected content.
<ERROR> oem-somerville-mewtwo-meta_20.04~ubuntu1.debdiff needs to update.

To post a comment you must log in.
Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
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
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta PASS
mir-bug PASS
oem-meta-packages PASS
git-url-insteadof-setting PASS
lp-dl-attm PASS
recovery-from-iso.sh PASS

https://oem-share.canonical.com/partners/lyoncore/share/artifacts/oem-scripts/oem-scripts-1.67-9e7b4be-in-linux-container-jammy

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/mir-bug b/mir-bug
2index 19f27be..8552278 100755
3--- a/mir-bug
4+++ b/mir-bug
5@@ -856,13 +856,24 @@ def check_and_update_bug_attachments(
6 _run_command(git_command)
7 git_dir = os.path.join(tmpdir, pkg_name)
8 os.chdir(git_dir)
9+ if args.release:
10+ # Change debian/changelog back to UNRELEASED
11+ lines = None
12+ changelog = os.path.join(tmpdir, pkg_name, "debian", "changelog")
13+ with open(changelog, "r") as f:
14+ lines = f.readlines()
15+
16+ version = UbuntuDistroInfo().version(series).split(" ")[0]
17+ lines[0] = f"{pkg_name} ({version}~ubuntu1) UNRELEASED; urgency=medium\n"
18+ with open(changelog, "w") as f:
19+ f.writelines(lines)
20 _run_command(["dpkg-buildpackage", "-S", "-us", "-uc"])
21 os.chdir(tmpdir)
22 dsc = glob(f"{pkg_name}*.dsc")[0]
23 prog = re.compile(fr"{pkg_name}_(.*).dsc")
24 result = prog.match(dsc)
25- version = result.group(1)
26- debdiff = f"{pkg_name}_{version}.debdiff"
27+ debian_version = result.group(1)
28+ debdiff = f"{pkg_name}_{debian_version}.debdiff"
29 # It should generate some debdiff so the return code should be 1 unless comparing to oem-qemu-meta itself.
30 debug(f"TZ={args.tz}")
31 content, _, _ = _run_command(

Subscribers

People subscribed via source and target branches