Merge lp:~xnox/ubuntu-cdimage/focal-oem-20.04 into lp:ubuntu-cdimage

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1835
Proposed branch: lp:~xnox/ubuntu-cdimage/focal-oem-20.04
Merge into: lp:ubuntu-cdimage
Diff against target: 61 lines (+3/-30)
2 files modified
lib/cdimage/livefs.py (+1/-14)
lib/cdimage/tests/test_livefs.py (+2/-16)
To merge this branch: bzr merge lp:~xnox/ubuntu-cdimage/focal-oem-20.04
Reviewer Review Type Date Requested Status
Iain Lane Approve
Ubuntu CD Image Team Pending
Review via email: mp+378322@code.launchpad.net

Commit message

Ubuntu Desktop flavours: rename oem-xx.yy back to oem

Turns out whilst metapackage is called oem-20.04, the actual kernel
flavour it points to is just -oem, hence livecd-rootfs will produce
artefacts with 'oem' suffix, and thus no oem-xx.yy logic is needed in
cdimage.

This partially reverts previously merged focal-oem-20.04 branch.

Description of the change

Ubuntu Desktop flavours: rename oem-xx.yy back to oem

Turns out whilst metapackage is called oem-20.04, the actual kernel
flavour it points to is just -oem, hence livecd-rootfs will produce
artefacts with 'oem' suffix, and thus no oem-xx.yy logic is needed in
cdimage.

This partially reverts previously merged focal-oem-20.04 branch.

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Irritating

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/cdimage/livefs.py'
2--- lib/cdimage/livefs.py 2020-01-30 10:57:36 +0000
3+++ lib/cdimage/livefs.py 2020-01-30 13:47:20 +0000
4@@ -471,22 +471,9 @@
5 project = config.project
6 series = config["DIST"]
7
8- def get_lts_upto(series):
9- from distro_info import UbuntuDistroInfo
10- import itertools
11-
12- udi = UbuntuDistroInfo()
13- it = itertools.dropwhile(lambda x: x != series, reversed(udi.all))
14-
15- for r in it:
16- if udi.is_lts(r):
17- yield r, udi.version(r).rstrip(' LTS')
18-
19 if cpuarch == "amd64":
20 if series >= "focal" and project == "ubuntu":
21- s = get_lts_upto(series)
22- _, v = next(s, (None, None))
23- return ["generic", "oem-{}".format(v)]
24+ return ["generic", "oem"]
25 if project == "ubuntustudio":
26 return ["lowlatency"]
27 else:
28
29=== modified file 'lib/cdimage/tests/test_livefs.py'
30--- lib/cdimage/tests/test_livefs.py 2020-01-30 10:58:19 +0000
31+++ lib/cdimage/tests/test_livefs.py 2020-01-30 13:47:20 +0000
32@@ -846,27 +846,13 @@
33 config["DIST"] = series
34 self.assertEqual(expected.split(), flavours(config, arch))
35
36- def assertFlavoursEqualGlob(self, expected, arch, project, series):
37- import fnmatch
38-
39- config = Config(read=False)
40- config["PROJECT"] = project
41- config["DIST"] = series
42- matches = all(
43- [
44- fnmatch.filter(flavours(config, arch), flavour)
45- for flavour in expected.split()
46- ]
47- )
48- self.assertTrue(matches)
49-
50 def test_amd64(self):
51 for series in all_series[4:31]:
52 self.assertFlavoursEqual(
53 "generic", "amd64", "ubuntu", series)
54 for series in all_series[31:-2]:
55- self.assertFlavoursEqualGlob(
56- "generic oem-*", "amd64", "ubuntu", series)
57+ self.assertFlavoursEqual(
58+ "generic oem", "amd64", "ubuntu", series)
59 for series in all_series[-2:0]:
60 self.assertFlavoursEqual(
61 "generic", "amd64", "ubuntu", series)

Subscribers

People subscribed via source and target branches