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: 452fffb2ca0a26efbbb0071031647efcc50b6cec
Merged at revision: 7a6254c6a6e58cc712036e23b6d6711cef439a30
Proposed branch: ~fourdollars/pc-enablement/+git/oem-scripts:master
Merge into: ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
Diff against target: 346 lines (+94/-65)
4 files modified
bootstrap-meta (+73/-51)
debian/tests/bootstrap-meta (+13/-8)
debian/tests/mir-bug (+2/-2)
mir-bug (+6/-4)
Reviewer Review Type Date Requested Status
Andy Chi Approve
Review via email: mp+446148@code.launchpad.net

Description of the change

$ bootstrap-meta create-sru-bug fossa-bronn.json --kernel linux-generic-hwe-20.04
<INFO> Using oem-scripts login
<INFO> meta package public bug: https://bugs.launchpad.net/bugs/2026244

*** Before this commit ***

$ bootstrap-meta update-sru-git fossa-bronn.json --kernel linux-generic-hwe-20.04 --dryrun
<INFO> Using oem-scripts login
> Do you want to update the bootstrap OEM metapackage in Git repository for LP: #2026244 - "[DRAFT] Update the hardware support for Dell Precision 5750 in oem-somerville-bronn-meta" for linux-generic-hwe-20.04? (y/n) y
<INFO> LP: #2026244 "[DRAFT] Update the hardware support for Dell Precision 5750 in oem-somerville-bronn-meta"
<CRITICAL> return 2
<CRITICAL> usage: pkg-somerville-meta [-h]
                           [-k {linux-oem-20.04d,linux-oem-20.04c,linux-oem-20.04b,linux-oem-20.04,linux-oem-22.04c,linux-oem-22.04b,linux-oem-22.04a,linux-oem-22.04,linux-generic-hwe-20.04,linux-generic-hwe-22.04,linux-generic}]
                           [-s {focal,jammy,kinetic,lunar,mantic}]
                           [--public-bug PUBLIC_BUG] --private-bug PRIVATE_BUG
                           [--market-name MARKET_NAME]
                           [--product-name PRODUCT_NAME] -p PLATFORM
                           bios_id [bios_id ...]
pkg-somerville-meta: error: the following arguments are required: --private-bug

*** After this commit ***

$ ./bootstrap-meta update-sru-git ~/projects/oem-hw-info/platform-info/somerville/fossa-bronn.json --kernel linux-generic-hwe-20.04 --yes
<INFO> Using oem-scripts login
> Do you want to update the bootstrap OEM metapackage in Git repository for LP: #2026244 - "[DRAFT] Update the hardware support for Dell Precision 5750 in oem-somerville-bronn-meta" for linux-generic-hwe-20.04? (y/n) y
<INFO> LP: #2026244 "[DRAFT] Update the hardware support for Dell Precision 5750 in oem-somerville-bronn-meta"
<WARNING> $ git diff
diff --git a/debian/changelog b/debian/changelog
index e8dd768..7d1211e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+oem-somerville-bronn-meta (20.04~ubuntu2) UNRELEASED; urgency=medium
+
+ * Update the hardware support for Dell Precision 5750. (LP: #2026244)
+
+ -- Shih-Yuan Lee (FourDollars) <email address hidden> Thu, 06 Jul 2023 14:24:27 +0800
+
 oem-somerville-bronn-meta (20.04~ubuntu1) focal; urgency=medium

   * Meta package for Somerville Bronn. (LP: #1897551)
diff --git a/debian/control b/debian/control
index 5c2add4..a55ea9b 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,8 @@ Package: oem-somerville-bronn-meta
 Architecture: all
 Depends: ${misc:Depends}, ubuntu-oem-keyring
 XB-Modaliases: ${modaliases}
-XB-Ubuntu-OEM-Kernel-Flavour: oem
-Description: hardware support for Somerville Bronn platform
- This is a metapackage for Somerville Bronn platform. It installs
- packages needed to support this hardware fully.
+XB-Ubuntu-OEM-Kernel-Flavour: default
+Description: hardware support for Dell Precision 5750
+ This is a metapackage for Dell PC:
+ * Dell Precision 5750
+ It installs packages needed to support this hardware fully.
diff --git a/debian/copyright b/debian/copyright
index 3641fb8..64a8e0e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,7 +3,7 @@ Upstream-Name: oem-somerville-bronn-meta
 Source: https://code.launchpad.net/~oem-solutions-engineers/pc-enablement/+git/oem-somerville-projects-meta/+ref/bronn-focal-ubuntu

 Files: *
-Copyright: 2020 Canonical Limited
+Copyright: 2023 Canonical Limited
 License: GPL-3
  This package is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
diff --git a/debian/modaliases b/debian/modaliases
index bed999c..fe8d131 100644
--- a/debian/modaliases
+++ b/debian/modaliases
@@ -1 +1 @@
-alias pci:*sv00001028sd00000990* meta oem-somerville-bronn-meta
+alias pci:*sv00001028sd00000990bc0Csc05* meta oem-somerville-bronn-meta
> Do you want to commit and push the changes above into the 'bronn-focal-ubuntu' branch of oem-somerville-bronn-meta's Git repository? (y/n) y

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

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-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.82-33c3f0e-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-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.82-6a20b66-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-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 FAIL non-zero exit status 1
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.82-ca0fc3b-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api PASS
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
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.82-0e4848a-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api PASS
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
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.82-0e4848a-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api FAIL non-zero exit status 1
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
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.82-8dd466f-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api PASS
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
mir-bug FAIL non-zero exit status 1
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.82-1a38013-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api PASS
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
mir-bug PASS
oem-meta-packages FAIL non-zero exit status 1
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.82-1a38013-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
blame: .
badpkg: rules build failed with exit code 2
erroneous package: rules build failed with exit code 2

https://oem-share.canonical.com/partners/lyoncore/share/artifacts/oem-scripts/oem-scripts-1.82-2426ebc-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa PASS
lp-api PASS
lp-bug PASS
pkg-list PASS
review-merge-proposal PASS
run-autopkgtest PASS
setup-apt-dir PASS
bootstrap-meta FAIL non-zero exit status 1
mir-bug PASS
oem-meta-packages FAIL non-zero exit status 1
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.82-452fffb-in-linux-container-jammy

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[autopkgtest]
pkg-iot-meta PASS
pkg-somerville-meta PASS
pkg-stella-meta PASS
pkg-sutton-meta PASS
bug-bind PASS
get-private-ppa FAIL non-zero exit status 1
lp-api FAIL non-zero exit status 1
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.82-452fffb-in-linux-container-jammy

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

My changes are not related to `get-private-ppa FAIL non-zero exit status 1` and `lp-api FAIL non-zero exit status 1`.
Those failures are majorly because of the unstable Launchpad staging server.

Revision history for this message
Andy Chi (andch) wrote :

4$ dada,
When will we use `bootstrap-meta`, is it for real meta SRU?

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote (last edit ):

No, bootstrap-meta is for the SRU process of the bootstrap meta in Ubuntu archive.

Revision history for this message
Andy Chi (andch) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bootstrap-meta b/bootstrap-meta
index b9f335f..c523795 100755
--- a/bootstrap-meta
+++ b/bootstrap-meta
@@ -28,7 +28,7 @@ import re
28import shutil28import shutil
2929
30from copy import copy30from copy import copy
31from logging import info, debug, warning, error, critical31from logging import info, warning, error, critical
32from oem_scripts import (32from oem_scripts import (
33 ALLOWED_KERNEL_META_LIST,33 ALLOWED_KERNEL_META_LIST,
34 SUBSCRIBER_LIST,34 SUBSCRIBER_LIST,
@@ -148,7 +148,13 @@ class BootstrapMeta(object):
148 raise Exception("Not supported")148 raise Exception("Not supported")
149149
150 def search_meta_bug(150 def search_meta_bug(
151 self, pattern, yes, output=None, update_bug=False, update_git=False151 self,
152 pattern,
153 yes,
154 dryrun=False,
155 output=None,
156 update_bug=False,
157 update_git=False,
152 ):158 ):
153 if update_bug and update_git:159 if update_bug and update_git:
154 critical("This should not happen.")160 critical("This should not happen.")
@@ -172,7 +178,7 @@ class BootstrapMeta(object):
172 bug = task.bug178 bug = task.bug
173 if pattern.match(bug.title):179 if pattern.match(bug.title):
174 found = True180 found = True
175 if yes_or_ask(181 if dryrun or yes_or_ask(
176 yes,182 yes,
177 f'{question_prefix} LP: #{bug.id} - "{bug.title}" for {self.kernel_meta}?',183 f'{question_prefix} LP: #{bug.id} - "{bug.title}" for {self.kernel_meta}?',
178 ):184 ):
@@ -184,7 +190,7 @@ class BootstrapMeta(object):
184 bug = task.bug190 bug = task.bug
185 if pattern.match(bug.title):191 if pattern.match(bug.title):
186 found = True192 found = True
187 if yes_or_ask(193 if dryrun or yes_or_ask(
188 yes,194 yes,
189 f'{question_prefix} LP: #{bug.id} - "{bug.title}" for {self.kernel_meta}?',195 f'{question_prefix} LP: #{bug.id} - "{bug.title}" for {self.kernel_meta}?',
190 ):196 ):
@@ -275,9 +281,13 @@ class BootstrapMetaSRU(BootstrapMeta):
275 task = bug.addTask(target=lp.projects[f"ubuntu/+source/{self.meta}"])281 task = bug.addTask(target=lp.projects[f"ubuntu/+source/{self.meta}"])
276 task.lp_save()282 task.lp_save()
277283
278 def update(self, release=False, ready=False, yes=False):284 def update(self, release=False, ready=False, yes=False, dryrun=False):
279 bug = self.search_meta_bug(285 bug = self.search_meta_bug(
280 pattern=self.pattern, yes=yes, output=self.output, update_bug=True286 pattern=self.pattern,
287 yes=yes,
288 dryrun=dryrun,
289 output=self.output,
290 update_bug=True,
281 )291 )
282 bug.title = f"Update the hardware support for {self.market_name} in {self.meta}"292 bug.title = f"Update the hardware support for {self.market_name} in {self.meta}"
283 bug.description = self._read_from_template()293 bug.description = self._read_from_template()
@@ -420,7 +430,9 @@ class BootstrapMetaGit(BootstrapMeta):
420 )430 )
421 if mir:431 if mir:
422 pattern = re.compile(rf".*[MIR] {self.meta}")432 pattern = re.compile(rf".*[MIR] {self.meta}")
423 bug = self.search_meta_bug(pattern=pattern, yes=yes, update_git=True)433 bug = self.search_meta_bug(
434 pattern=pattern, yes=yes, dryrun=dryrun, update_git=True
435 )
424 info(f'LP: #{bug.id} "{bug.title}"')436 info(f'LP: #{bug.id} "{bug.title}"')
425 if self.group:437 if self.group:
426 branch = f"{self.group}.{self.platform}-focal-ubuntu"438 branch = f"{self.group}.{self.platform}-focal-ubuntu"
@@ -429,6 +441,7 @@ class BootstrapMetaGit(BootstrapMeta):
429 kernel_flavour, _, market_name, ids = _get_items_from_git(441 kernel_flavour, _, market_name, ids = _get_items_from_git(
430 self.project, branch, self.meta442 self.project, branch, self.meta
431 )443 )
444 meta_bug = self.json.get("metabug", "")
432 with TemporaryDirectory() as tmpdir:445 with TemporaryDirectory() as tmpdir:
433 os.chdir(tmpdir)446 os.chdir(tmpdir)
434 # Generated the meta package by pkg-oem-meta447 # Generated the meta package by pkg-oem-meta
@@ -443,6 +456,8 @@ class BootstrapMetaGit(BootstrapMeta):
443 self.platform,456 self.platform,
444 "--public-bug",457 "--public-bug",
445 str(bug.id),458 str(bug.id),
459 "--private-bug",
460 str(meta_bug),
446 "--market-name",461 "--market-name",
447 self.market_name,462 self.market_name,
448 ]463 ]
@@ -463,6 +478,8 @@ class BootstrapMetaGit(BootstrapMeta):
463 self.platform,478 self.platform,
464 "--public-bug",479 "--public-bug",
465 str(bug.id),480 str(bug.id),
481 "--private-bug",
482 str(meta_bug),
466 "--market-name",483 "--market-name",
467 self.market_name,484 self.market_name,
468 ]485 ]
@@ -483,6 +500,8 @@ class BootstrapMetaGit(BootstrapMeta):
483 self.platform,500 self.platform,
484 "--public-bug",501 "--public-bug",
485 str(bug.id),502 str(bug.id),
503 "--private-bug",
504 str(meta_bug),
486 "--market-name",505 "--market-name",
487 self.market_name,506 self.market_name,
488 ]507 ]
@@ -505,6 +524,7 @@ class BootstrapMetaGit(BootstrapMeta):
505 shutil.rmtree(os.path.join(new_dir, ".git"))524 shutil.rmtree(os.path.join(new_dir, ".git"))
506 os.remove(os.path.join(new_dir, "debian", "changelog"))525 os.remove(os.path.join(new_dir, "debian", "changelog"))
507526
527 # Checkout git branch
508 git_repo = f"git+ssh://{lp.me.name}@git.launchpad.net/~oem-solutions-engineers/pc-enablement/+git/oem-{self.project}-projects-meta"528 git_repo = f"git+ssh://{lp.me.name}@git.launchpad.net/~oem-solutions-engineers/pc-enablement/+git/oem-{self.project}-projects-meta"
509 git_command = (529 git_command = (
510 "git",530 "git",
@@ -520,48 +540,6 @@ class BootstrapMetaGit(BootstrapMeta):
520 os.chdir(os.path.join(tmpdir, self.meta))540 os.chdir(os.path.join(tmpdir, self.meta))
521 shutil.copytree(new_dir, ".", dirs_exist_ok=True)541 shutil.copytree(new_dir, ".", dirs_exist_ok=True)
522542
523 lines = None
524 found = False
525 changelog = os.path.join(tmpdir, self.meta, "debian", "changelog")
526 with open(changelog, "r") as f:
527 lines = f.readlines()
528
529 for idx, line in enumerate(lines):
530 if f"(LP: #{bug.id})" in line:
531 found = True
532 lines[
533 idx
534 ] = f" * Update the hardware support for {self.market_name}. (LP: #{bug.id})\n"
535
536 if found:
537 with open(changelog, "w") as f:
538 f.writelines(lines)
539 else:
540 dist, _, _ = _run_command(
541 [
542 "dpkg-parsechangelog",
543 "--show-field",
544 "Distribution",
545 "-l",
546 "debian/changelog",
547 ]
548 )
549 if dist == "UNRELEASED":
550 _run_command(
551 [
552 "dch",
553 f"Update the hardware support for {self.market_name}. (LP: #{bug.id})",
554 ]
555 )
556 else:
557 _run_command(
558 [
559 "dch",
560 "-i",
561 f"Update the hardware support for {self.market_name}. (LP: #{bug.id})",
562 ]
563 )
564
565 # Remove deprecated autopkgtest file543 # Remove deprecated autopkgtest file
566 deprecated_test = os.path.join(544 deprecated_test = os.path.join(
567 tmpdir, self.meta, "debian", "tests", self.meta545 tmpdir, self.meta, "debian", "tests", self.meta
@@ -572,11 +550,55 @@ class BootstrapMetaGit(BootstrapMeta):
572 # Remove deprecated debian/compat550 # Remove deprecated debian/compat
573 deprecated_compat = os.path.join(tmpdir, self.meta, "debian", "compat")551 deprecated_compat = os.path.join(tmpdir, self.meta, "debian", "compat")
574 if os.path.exists(deprecated_compat):552 if os.path.exists(deprecated_compat):
575 _run_command(["git", "rm", f"debian/compat"])553 _run_command(["git", "rm", "debian/compat"])
554
555 out, _, _ = _run_command(["git", "diff"])
556 if out:
557 # Dealing with debian/changelog
558 lines = None
559 found = False
560 changelog = os.path.join(tmpdir, self.meta, "debian", "changelog")
561 with open(changelog, "r") as f:
562 lines = f.readlines()
563
564 for idx, line in enumerate(lines):
565 if f"(LP: #{bug.id})" in line:
566 found = True
567 lines[
568 idx
569 ] = f" * Update the hardware support for {self.market_name}. (LP: #{bug.id})\n"
570
571 if found:
572 with open(changelog, "w") as f:
573 f.writelines(lines)
574 else:
575 dist, _, _ = _run_command(
576 [
577 "dpkg-parsechangelog",
578 "--show-field",
579 "Distribution",
580 "-l",
581 "debian/changelog",
582 ]
583 )
584 if dist == "UNRELEASED":
585 _run_command(
586 [
587 "dch",
588 f"Update the hardware support for {self.market_name}. (LP: #{bug.id})",
589 ]
590 )
591 else:
592 _run_command(
593 [
594 "dch",
595 "-i",
596 f"Update the hardware support for {self.market_name}. (LP: #{bug.id})",
597 ]
598 )
576599
577 # Check git status600 # Check git status
578 if args.debug:601 if args.debug:
579 debug("$ git status")
580 out, _, _ = _run_command(["git", "status"])602 out, _, _ = _run_command(["git", "status"])
581 print(out)603 print(out)
582604
diff --git a/debian/tests/bootstrap-meta b/debian/tests/bootstrap-meta
index a4dff03..0338fcc 100644
--- a/debian/tests/bootstrap-meta
+++ b/debian/tests/bootstrap-meta
@@ -4,6 +4,7 @@ set -euo pipefail
4IFS=$'\n\t'4IFS=$'\n\t'
55
6export LAUNCHPAD_API="https://api.staging.launchpad.net/"6export LAUNCHPAD_API="https://api.staging.launchpad.net/"
7export COPYRIGHT_YEAR=2021
78
8# Change the working folder to avoid reading the template files under the source code folder.9# Change the working folder to avoid reading the template files under the source code folder.
9cd /tmp10cd /tmp
@@ -11,6 +12,8 @@ cd /tmp
11cat > fossa-varys.json <<ENDLINE12cat > fossa-varys.json <<ENDLINE
12{13{
13 "group": "",14 "group": "",
15 "metabug": 1908047,
16 "mirbug": 1937243,
14 "platform": "varys",17 "platform": "varys",
15 "productnames": [18 "productnames": [
16 "Precision 5550"19 "Precision 5550"
@@ -26,7 +29,7 @@ cleanup() {
26 rm bugid29 rm bugid
27 fi30 fi
28 if [ -f "$BUG_ID.json" ]; then31 if [ -f "$BUG_ID.json" ]; then
29 jq -C -S < "$BUG_ID.json"32 jq -S -M < "$BUG_ID.json"
30 rm "$BUG_ID.json"33 rm "$BUG_ID.json"
31 lp-bug cleanup --yes "$BUG_ID"34 lp-bug cleanup --yes "$BUG_ID"
32 fi35 fi
@@ -36,7 +39,7 @@ trap cleanup EXIT INT TERM
3639
37bootstrap-meta create-sru-bug fossa-varys.json --kernel linux-oem-20.04 --output bugid40bootstrap-meta create-sru-bug fossa-varys.json --kernel linux-oem-20.04 --output bugid
38BUG_ID=$(cat bugid)41BUG_ID=$(cat bugid)
39launchpad-api get "bugs/$BUG_ID" > "$BUG_ID.json"42lp-api get "bugs/$BUG_ID" > "$BUG_ID.json"
40jq -r .description < "$BUG_ID.json" | grep "Precision 5550"43jq -r .description < "$BUG_ID.json" | grep "Precision 5550"
41jq -r .description < "$BUG_ID.json" | grep linux-oem-20.0444jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04
42jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-meta-packages45jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-meta-packages
@@ -47,20 +50,22 @@ if bootstrap-meta create-sru-bug fossa-varys.json --kernel linux-oem-20.04 --out
47fi50fi
4851
49bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-oem-20.04b --yes52bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-oem-20.04b --yes
50launchpad-api get "bugs/$BUG_ID" > "$BUG_ID.json"53lp-api get "bugs/$BUG_ID" > "$BUG_ID.json"
51jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04b54jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04b
5255
53bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-oem-20.04c --yes --ready56bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-oem-20.04c --yes --ready
54launchpad-api get "bugs/$BUG_ID" > "$BUG_ID.json"57lp-api get "bugs/$BUG_ID" > "$BUG_ID.json"
55jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04c58jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04c
56jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-needs-upload59jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-needs-upload
5760
58bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-oem-20.04d --yes --release61bootstrap-meta update-sru-bug fossa-varys.json --kernel linux-generic-hwe-20.04 --yes --release
59launchpad-api get "bugs/$BUG_ID" > "$BUG_ID.json"62lp-api get "bugs/$BUG_ID" > "$BUG_ID.json"
60jq -r .description < "$BUG_ID.json" | grep linux-oem-20.04d63jq -r .description < "$BUG_ID.json" | grep linux-generic-hwe-20.04
61jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-done-upload64jq -r '.tags|join(" ")' < "$BUG_ID.json" | grep oem-done-upload
6265
63if bootstrap-meta update-sru-git fossa-varys.json --kernel linux-oem-20.04d --yes --dryrun; then66if bootstrap-meta update-sru-git fossa-varys.json --kernel linux-oem-20.04d --dryrun; then
64 echo "It is expected to return failed."67 echo "It is expected to return failed."
65 exit 168 exit 1
66fi69fi
70
71bootstrap-meta update-sru-git fossa-varys.json --kernel linux-generic-hwe-20.04 --dryrun
diff --git a/debian/tests/mir-bug b/debian/tests/mir-bug
index 1858edd..94610c8 100644
--- a/debian/tests/mir-bug
+++ b/debian/tests/mir-bug
@@ -22,7 +22,7 @@ trap cleanup EXIT INT TERM
22# create22# create
23mir-bug create -o bug_id somerville bronn "some Dell platforms" --series focal23mir-bug create -o bug_id somerville bronn "some Dell platforms" --series focal
24BUG_ID=$(cat bug_id)24BUG_ID=$(cat bug_id)
25launchpad-api get bugs/"$BUG_ID" > "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json"25lp-api get bugs/"$BUG_ID" > "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json"
26jq -r .title < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep "\[MIR\] oem-somerville-bronn-meta"26jq -r .title < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep "\[MIR\] oem-somerville-bronn-meta"
27jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep focal27jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep focal
28jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep 20.0428jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep 20.04
@@ -31,7 +31,7 @@ rm bug_id
3131
32mir-bug create -o bug_id somerville tentacool "some Dell platforms" --series jammy32mir-bug create -o bug_id somerville tentacool "some Dell platforms" --series jammy
33BUG_ID=$(cat bug_id)33BUG_ID=$(cat bug_id)
34launchpad-api get bugs/"$BUG_ID" > "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json"34lp-api get bugs/"$BUG_ID" > "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json"
35jq -r .title < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep "\[MIR\]\[jammy\] oem-somerville-tentacool-meta"35jq -r .title < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep "\[MIR\]\[jammy\] oem-somerville-tentacool-meta"
36jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep jammy36jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep jammy
37jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep 22.0437jq -r .description < "$AUTOPKGTEST_ARTIFACTS/$BUG_ID.json" | grep 22.04
diff --git a/mir-bug b/mir-bug
index d01bd75..6049d74 100755
--- a/mir-bug
+++ b/mir-bug
@@ -110,10 +110,12 @@ update.add_argument(
110update.add_argument(110update.add_argument(
111 "--ready",111 "--ready",
112 action="store_true",112 action="store_true",
113 help="Update the bug to Fix Committed, also affects 'Ubuntu', and subscribe 'ubuntu-sponsors' and 'ubuntu-desktop'.",113 help="Update the oem-priority bug to Fix Committed, and wait for an OEM metapackages uploader to upload the package.",
114)114)
115update.add_argument(115update.add_argument(
116 "--release", action="store_true", help="Update the bug for release."116 "--release",
117 action="store_true",
118 help="Also affects 'Ubuntu', and subscribe 'ubuntu-sponsors'.",
117)119)
118120
119check = subparsers.add_parser(121check = subparsers.add_parser(
@@ -719,11 +721,11 @@ def update_bug_status(bug, pkg_name: str, yes: bool, series: str) -> None:
719 _change_task_status(bug_task, "Incomplete", yes)721 _change_task_status(bug_task, "Incomplete", yes)
720 else:722 else:
721 warning(f"{bug_task.bug_target_name} {bug_task.status}")723 warning(f"{bug_task.bug_target_name} {bug_task.status}")
722 if args.ready and saw_ubuntu_task is False:724 if args.release and args.ready and saw_ubuntu_task is False:
723 bug.addTask(target=lp.projects["Ubuntu"])725 bug.addTask(target=lp.projects["Ubuntu"])
724 for bug_task in bug.bug_tasks:726 for bug_task in bug.bug_tasks:
725 if bug_task.bug_target_name == "ubuntu":727 if bug_task.bug_target_name == "ubuntu":
726 _change_task_status(bug_task, "Confirmed", yes)728 _change_task_status(bug_task, "In Progress", yes)
727729
728730
729def check_and_update_bug_subscriptions(lp, bug, update=False, yes=False) -> bool:731def check_and_update_bug_subscriptions(lp, bug, update=False, yes=False) -> bool:

Subscribers

People subscribed via source and target branches