Merge ~mwhudson/ubuntu-cdimage:remove-touch-support into ubuntu-cdimage:main
- Git
- lp:~mwhudson/ubuntu-cdimage
- remove-touch-support
- Merge into main
Proposed by
Michael Hudson-Doyle
Status: | Merged |
---|---|
Merged at revision: | e7bc73732e2afce5833d1e4a631f15fb43d133e6 |
Proposed branch: | ~mwhudson/ubuntu-cdimage:remove-touch-support |
Merge into: | ubuntu-cdimage:main |
Diff against target: |
835 lines (+8/-451) 15 files modified
bin/rebuild-requests (+0/-6) etc/default-arches (+0/-2) etc/livefs-launchpad (+0/-2) etc/purge-days (+0/-1) etc/qa-products (+0/-4) lib/cdimage/build.py (+2/-47) lib/cdimage/config.py (+0/-35) lib/cdimage/livefs.py (+1/-73) lib/cdimage/project.py (+2/-4) lib/cdimage/tests/test_build.py (+1/-65) lib/cdimage/tests/test_build_id.py (+0/-15) lib/cdimage/tests/test_config.py (+0/-24) lib/cdimage/tests/test_livefs.py (+0/-72) lib/cdimage/tests/test_tree.py (+0/-24) lib/cdimage/tree.py (+2/-77) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek | Approve | ||
Review via email:
|
Commit message
remove all references to ubuntu touch
Description of the change
sniff
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/bin/rebuild-requests b/bin/rebuild-requests |
2 | index fb65dbe..bac320d 100755 |
3 | --- a/bin/rebuild-requests |
4 | +++ b/bin/rebuild-requests |
5 | @@ -179,12 +179,6 @@ def main(): |
6 | if sub_project: |
7 | env['SUBPROJECT'] = sub_project |
8 | |
9 | - if (project == "ubuntu-touch" and |
10 | - args[0] in ("bionic", "focal")): |
11 | - env['EXTRA_PPAS'] = \ |
12 | - "ci-train-ppa-service/stable-phone-overlay:1001" |
13 | - env['PROPOSED'] = "0" |
14 | - |
15 | env['ARCHES'] = arches |
16 | env['DIST'] = entries[0][0].series_title.lower() |
17 | |
18 | diff --git a/etc/default-arches b/etc/default-arches |
19 | index 38f7880..2c7960a 100644 |
20 | --- a/etc/default-arches |
21 | +++ b/etc/default-arches |
22 | @@ -7,8 +7,6 @@ |
23 | # * source focal- amd64 |
24 | * source * i386 |
25 | |
26 | -ubuntu-touch daily-preinstalled bionic- armhf i386 arm64 |
27 | - |
28 | ubuntu-base daily bionic amd64 arm64 armhf i386 ppc64el s390x |
29 | ubuntu-base daily focal- amd64 arm64 armhf ppc64el riscv64 s390x |
30 | ubuntu-core-system-image daily-preinstalled xenial- amd64 arm64 armhf i386 ppc64el s390x |
31 | diff --git a/etc/livefs-launchpad b/etc/livefs-launchpad |
32 | index 3b37ee6..e29c42d 100644 |
33 | --- a/etc/livefs-launchpad |
34 | +++ b/etc/livefs-launchpad |
35 | @@ -30,8 +30,6 @@ ubuntu-gnome daily-live * * ubuntu-cdimage/ubuntu-gnome |
36 | ubuntu-mate daily-live * * ubuntu-cdimage/ubuntu-mate |
37 | ubuntu-budgie daily-live * * ubuntu-cdimage/ubuntu-budgie |
38 | ubuntu-budgie-legacy daily-legacy * * ubuntu-cdimage/ubuntu-budgie-legacy |
39 | -ubuntu-touch daily-preinstalled ubuntu-rtm/* * ubuntu-cdimage/ubuntu-touch |
40 | -ubuntu-touch daily-preinstalled bionic- * ubuntu-cdimage/ubuntu-touch |
41 | ubuntu-unity daily-live * * ubuntu-cdimage/ubuntu-unity |
42 | ubuntucinnamon daily-live * * ubuntu-cdimage/ubuntucinnamon |
43 | ubuntu-wubi wubi * * ubuntu-cdimage/ubuntu-wubi |
44 | diff --git a/etc/purge-days b/etc/purge-days |
45 | index 8a0e7ea..94ba01d 100644 |
46 | --- a/etc/purge-days |
47 | +++ b/etc/purge-days |
48 | @@ -9,7 +9,6 @@ dvd 2 |
49 | # Ubuntu Core images are not purged per age |
50 | ubuntu-core 0 |
51 | ubuntu-appliance 0 |
52 | -ubuntu-touch 7 |
53 | source 1 |
54 | wubi 1 |
55 | ubuntu-zh_CN 3 |
56 | diff --git a/etc/qa-products b/etc/qa-products |
57 | index f64820e..22f65ae 100644 |
58 | --- a/etc/qa-products |
59 | +++ b/etc/qa-products |
60 | @@ -97,10 +97,6 @@ Ubuntu Server Subiquity riscv64 ubuntu-server/live daily-live live-server |
61 | Ubuntu Studio DVD amd64 ubuntustudio dvd dvd amd64 iso |
62 | Ubuntu Studio DVD i386 ubuntustudio dvd dvd i386 iso |
63 | |
64 | -# Ubuntu Touch |
65 | -Ubuntu Touch armhf ubuntu-touch daily-preinstalled preinstalled-touch armhf iso |
66 | -Ubuntu Touch i386 ubuntu-touch daily-preinstalled preinstalled-touch i386 iso |
67 | - |
68 | # Ubuntu Kylin |
69 | Ubuntu Kylin Desktop amd64 ubuntukylin daily-live desktop amd64 iso |
70 | Ubuntu Kylin Desktop i386 ubuntukylin daily-live desktop i386 iso |
71 | diff --git a/lib/cdimage/build.py b/lib/cdimage/build.py |
72 | index 447a553..edb6dd5 100644 |
73 | --- a/lib/cdimage/build.py |
74 | +++ b/lib/cdimage/build.py |
75 | @@ -43,7 +43,6 @@ from cdimage.mail import get_notify_addresses, send_mail |
76 | from cdimage.mirror import trigger_mirrors |
77 | from cdimage.tracker import tracker_set_rebuild_status |
78 | from cdimage.tree import Publisher, Tree |
79 | -from cdimage.config import Touch |
80 | |
81 | __metaclass__ = type |
82 | |
83 | @@ -361,38 +360,6 @@ def build_ubuntu_defaults_locale(config): |
84 | [pi_makelist, entry_path], stdout=list_file) |
85 | |
86 | |
87 | -def add_android_support(config, arch, output_dir): |
88 | - """Copy Android support files to an Ubuntu Touch image. |
89 | - """ |
90 | - live_scratch_dir = os.path.join( |
91 | - config.root, "scratch", config.subtree, config.project, |
92 | - config.full_series, config.image_type, "live") |
93 | - |
94 | - # copy recovery, boot and system imgs in place |
95 | - for target in Touch.list_targets_by_ubuntu_arch(arch): |
96 | - boot_img_src = "boot-%s+%s.img" % (target.ubuntu_arch, target.subarch) |
97 | - boot_img = "%s-preinstalled-boot-%s+%s.img" % ( |
98 | - config.series, arch, target.subarch) |
99 | - system_img_src = "system-%s+%s.img" % ( |
100 | - target.android_arch, target.subarch) |
101 | - system_img = "%s-preinstalled-system-%s+%s.img" % ( |
102 | - config.series, target.android_arch, target.subarch) |
103 | - recovery_img_src = "recovery-%s+%s.img" % ( |
104 | - target.android_arch, target.subarch) |
105 | - recovery_img = "%s-preinstalled-recovery-%s+%s.img" % ( |
106 | - config.series, target.android_arch, target.subarch) |
107 | - |
108 | - shutil.copy2( |
109 | - os.path.join(live_scratch_dir, boot_img_src), |
110 | - os.path.join(output_dir, boot_img)) |
111 | - shutil.copy2( |
112 | - os.path.join(live_scratch_dir, system_img_src), |
113 | - os.path.join(output_dir, system_img)) |
114 | - shutil.copy2( |
115 | - os.path.join(live_scratch_dir, recovery_img_src), |
116 | - os.path.join(output_dir, recovery_img)) |
117 | - |
118 | - |
119 | def build_livecd_base(config): |
120 | log_marker("Downloading live filesystem images") |
121 | download_live_filesystems(config) |
122 | @@ -500,7 +467,7 @@ def build_livecd_base(config): |
123 | shutil.copy2( |
124 | live_qcow2, "%s.qcow2" % output_prefix) |
125 | |
126 | - if (config.project in ("ubuntu-base", "ubuntu-touch") or |
127 | + if (config.project == "ubuntu-base" or |
128 | (config.project == "ubuntu-core" and |
129 | config.subproject == "system-image")): |
130 | log_marker("Copying images to debian-cd output directory") |
131 | @@ -521,23 +488,11 @@ def build_livecd_base(config): |
132 | elif config.project == "ubuntu-base": |
133 | output_prefix = os.path.join( |
134 | output_dir, "%s-base-%s" % (config.series, arch)) |
135 | - elif config.project == "ubuntu-touch": |
136 | - output_prefix = os.path.join( |
137 | - output_dir, |
138 | - "%s-preinstalled-touch-%s" % (config.series, arch)) |
139 | shutil.copy2(rootfs, "%s.raw" % output_prefix) |
140 | with open("%s.type" % output_prefix, "w") as f: |
141 | print("tar archive", file=f) |
142 | shutil.copy2( |
143 | "%s.manifest" % live_prefix, "%s.manifest" % output_prefix) |
144 | - if config.project == "ubuntu-touch": |
145 | - osextras.link_force( |
146 | - "%s.raw" % output_prefix, "%s.tar.gz" % output_prefix) |
147 | - add_android_support(config, arch, output_dir) |
148 | - custom = "%s.custom.tar.gz" % live_prefix |
149 | - if os.path.exists(custom): |
150 | - shutil.copy2( |
151 | - custom, "%s.custom.tar.gz" % output_prefix) |
152 | if config.project == "ubuntu-core": |
153 | for dev in ("azure.device", "device", "raspi2.device", |
154 | "plano.device"): |
155 | @@ -664,7 +619,7 @@ def is_live_fs_only(config): |
156 | live_fs_only = False |
157 | if config.project in ( |
158 | "livecd-base", "ubuntu-base", "ubuntu-core", |
159 | - "ubuntu-core-desktop", "ubuntu-appliance", "ubuntu-touch"): |
160 | + "ubuntu-core-desktop", "ubuntu-appliance"): |
161 | live_fs_only = True |
162 | elif (config.project in ("ubuntu", "ubuntu-server") and |
163 | config.image_type == "daily-preinstalled"): |
164 | diff --git a/lib/cdimage/config.py b/lib/cdimage/config.py |
165 | index 9b5acea..e9342cd 100644 |
166 | --- a/lib/cdimage/config.py |
167 | +++ b/lib/cdimage/config.py |
168 | @@ -260,43 +260,8 @@ all_series.extend([ |
169 | _core_series="22", # XXX: temporary for Core Desktop experiments |
170 | all_lts_projects=True), |
171 | Series("noble", "24.04", "Noble Numbat"), |
172 | - |
173 | - Series("14.09", "14.09", "RTM 14.09", distribution="ubuntu-rtm"), |
174 | - Series( |
175 | - "14.09-factory", "14.09.1", "RTM 14.09-factory", |
176 | - distribution="ubuntu-rtm"), |
177 | ]) |
178 | |
179 | -all_touch_targets = [] |
180 | - |
181 | - |
182 | -class Touch: |
183 | - def __init__(self, subarch, android_arch, ubuntu_arch): |
184 | - self.subarch = subarch |
185 | - self.android_arch = android_arch |
186 | - self.ubuntu_arch = ubuntu_arch |
187 | - |
188 | - @classmethod |
189 | - def list_android_arches(self): |
190 | - return list(set([touch.android_arch for touch in all_touch_targets])) |
191 | - |
192 | - @classmethod |
193 | - def list_ubuntu_arches(self): |
194 | - return list(set([touch.ubuntu_arch for touch in all_touch_targets])) |
195 | - |
196 | - @classmethod |
197 | - def list_targets_by_ubuntu_arch(self, arch): |
198 | - return [target for target in all_touch_targets |
199 | - if target.ubuntu_arch == arch] |
200 | - |
201 | - |
202 | -# TODO: This should probably come from a configuration file. |
203 | -all_touch_targets.extend([ |
204 | - Touch("mako", "armel", "armhf"), |
205 | - Touch("generic", "armel", "armhf"), |
206 | - Touch("generic_x86", "i386", "i386"), |
207 | - Touch("flo", "armel", "armhf"), |
208 | -]) |
209 | |
210 | _allowed_keys = ( |
211 | "PROJECT", |
212 | diff --git a/lib/cdimage/livefs.py b/lib/cdimage/livefs.py |
213 | index 598035b..6646334 100644 |
214 | --- a/lib/cdimage/livefs.py |
215 | +++ b/lib/cdimage/livefs.py |
216 | @@ -34,7 +34,6 @@ except ImportError: |
217 | from urllib2 import URLError, unquote, urlopen |
218 | |
219 | from cdimage import osextras, sign |
220 | -from cdimage.config import Touch |
221 | from cdimage.launchpad import get_launchpad |
222 | from cdimage.log import logger |
223 | from cdimage.mail import get_notify_addresses, send_mail |
224 | @@ -120,7 +119,7 @@ def live_build_options(config, arch): |
225 | elif subarch in ("ac100", "nexus7"): |
226 | options.extend(["-f", "plain"]) |
227 | |
228 | - if config.project in ("ubuntu-base", "ubuntu-core", "ubuntu-touch"): |
229 | + if config.project in ("ubuntu-base", "ubuntu-core"): |
230 | options.extend(["-f", "plain"]) |
231 | |
232 | if config.subproject == "wubi": |
233 | @@ -597,19 +596,6 @@ def live_item_paths(config, arch, item): |
234 | for url in urls_for("livecd." + liveproject_subarch, |
235 | item + "-" + flavour): |
236 | yield url |
237 | - elif item in ( |
238 | - "boot-%s+%s.img" % (target.ubuntu_arch, target.subarch) |
239 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
240 | - ) or item in ( |
241 | - "recovery-%s+%s.img" % (target.android_arch, target.subarch) |
242 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
243 | - ) or item in ( |
244 | - "system-%s+%s.img" % (target.android_arch, target.subarch) |
245 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
246 | - ): |
247 | - for flavour in flavours(config, arch): |
248 | - for url in urls_for("livecd." + liveproject_subarch, item): |
249 | - yield url |
250 | elif item == "kernel-efi-signed": |
251 | if arch == "amd64": |
252 | for flavour in flavours(config, arch): |
253 | @@ -659,17 +645,6 @@ def download_live_items(config, arch, item): |
254 | except osextras.FetchError: |
255 | pass |
256 | elif item in ( |
257 | - "boot-%s+%s.img" % (target.ubuntu_arch, target.subarch) |
258 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
259 | - ): |
260 | - for url in urls: |
261 | - target = os.path.join(output_dir, item) |
262 | - try: |
263 | - osextras.fetch(config, url, target) |
264 | - found = True |
265 | - except osextras.FetchError: |
266 | - pass |
267 | - elif item in ( |
268 | "modules.squashfs", |
269 | ): |
270 | for url in urls: |
271 | @@ -681,28 +656,6 @@ def download_live_items(config, arch, item): |
272 | found = True |
273 | except osextras.FetchError: |
274 | pass |
275 | - elif item in ( |
276 | - "recovery-%s+%s.img" % (target.android_arch, target.subarch) |
277 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
278 | - ): |
279 | - for url in urls: |
280 | - target = os.path.join(output_dir, item) |
281 | - try: |
282 | - osextras.fetch(config, url, target) |
283 | - found = True |
284 | - except osextras.FetchError: |
285 | - pass |
286 | - elif item in ( |
287 | - "system-%s+%s.img" % (target.android_arch, target.subarch) |
288 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
289 | - ): |
290 | - for url in urls: |
291 | - target = os.path.join(output_dir, item) |
292 | - try: |
293 | - osextras.fetch(config, url, target) |
294 | - found = True |
295 | - except osextras.FetchError: |
296 | - pass |
297 | elif item == "kernel-efi-signed": |
298 | for url in urls: |
299 | base = unquote(os.path.basename(url)) |
300 | @@ -845,31 +798,6 @@ def download_live_filesystems(config): |
301 | if not got_image: |
302 | raise NoFilesystemImages("No filesystem images found.") |
303 | |
304 | - if config.project == "ubuntu-touch": |
305 | - for arch in config.arches: |
306 | - for abootimg in ( |
307 | - "boot-%s+%s.img" % (target.ubuntu_arch, target.subarch) |
308 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
309 | - ): |
310 | - download_live_items( |
311 | - config, arch, abootimg |
312 | - ) |
313 | - for recoveryimg in ( |
314 | - "recovery-%s+%s.img" % (target.android_arch, target.subarch) |
315 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
316 | - ): |
317 | - download_live_items( |
318 | - config, arch, recoveryimg |
319 | - ) |
320 | - for systemimg in ( |
321 | - "system-%s+%s.img" % (target.android_arch, target.subarch) |
322 | - for target in Touch.list_targets_by_ubuntu_arch(arch) |
323 | - ): |
324 | - download_live_items( |
325 | - config, arch, systemimg |
326 | - ) |
327 | - download_live_items(config, arch, "custom.tar.gz") |
328 | - |
329 | if config.project == "ubuntu-core": |
330 | for arch in config.arches: |
331 | download_live_items(config, arch, "device.tar.gz") |
332 | diff --git a/lib/cdimage/project.py b/lib/cdimage/project.py |
333 | index b8cf15e..318ed37 100644 |
334 | --- a/lib/cdimage/project.py |
335 | +++ b/lib/cdimage/project.py |
336 | @@ -20,8 +20,8 @@ import os |
337 | |
338 | # Be careful about the values here; in most cases they are passed to |
339 | # debian-cd, which will get upset if they contain a space, hence all the |
340 | -# odd-looking hyphens. ubuntu-zh_CN and ubuntu-touch-preview are exceptions |
341 | -# to this, because they do not use debian-cd. |
342 | +# odd-looking hyphens. ubuntu-zh_CN is an exception to this, because it |
343 | +# does not use debian-cd. |
344 | # For projects that use debian-cd, it will construct an ISO9660 volume ID |
345 | # as "$(CAPPROJECT) $(DEBVERSION) $(ARCH)", e.g. "Ubuntu 14.10 amd64"; for |
346 | # powerpc, $(ARCH) is abbreviated to "ppc". The volume ID is limited to 32 |
347 | @@ -50,8 +50,6 @@ project_map = { |
348 | "ubuntu-core-desktop": "Ubuntu Core Desktop", |
349 | "ubuntu-appliance": "Ubuntu Appliance", |
350 | "ubuntu-base": "Ubuntu-Base", |
351 | - "ubuntu-touch-preview": "Ubuntu Touch Preview", |
352 | - "ubuntu-touch": "Ubuntu Touch", |
353 | "ubuntu-mini-iso": "Ubuntu-Mini-ISO", |
354 | } |
355 | |
356 | diff --git a/lib/cdimage/tests/test_build.py b/lib/cdimage/tests/test_build.py |
357 | index 1cdc4ba..2ddaffc 100644 |
358 | --- a/lib/cdimage/tests/test_build.py |
359 | +++ b/lib/cdimage/tests/test_build.py |
360 | @@ -58,7 +58,7 @@ from cdimage.build import ( |
361 | sync_local_mirror, |
362 | want_live_builds, |
363 | ) |
364 | -from cdimage.config import Config, Touch |
365 | +from cdimage.config import Config |
366 | from cdimage.log import logger |
367 | from cdimage.mail import text_file_type |
368 | from cdimage.tests.helpers import TestCase, mkfile, touch |
369 | @@ -428,70 +428,6 @@ class TestBuildLiveCDBase(TestCase): |
370 | "amd64.qcow2", |
371 | ], os.listdir(output_dir)) |
372 | |
373 | - @mock.patch("cdimage.osextras.fetch") |
374 | - def _perform_ubuntu_touch_testing(self, project, mock_fetch): |
375 | - '''Convenience function for testing ubuntu-touch* builds.''' |
376 | - def fetch_side_effect(config, source, target): |
377 | - if (target.endswith(".manifest") or |
378 | - target.endswith(".rootfs.tar.gz") or |
379 | - target.endswith(".custom.tar.gz") or |
380 | - target.endswith(".img")): |
381 | - touch(target) |
382 | - else: |
383 | - raise osextras.FetchError |
384 | - |
385 | - mock_fetch.side_effect = fetch_side_effect |
386 | - self.config["CDIMAGE_PREINSTALLED"] = "1" |
387 | - self.config["PROJECT"] = project |
388 | - self.config["DIST"] = "bionic" |
389 | - self.config["IMAGE_TYPE"] = "daily-preinstalled" |
390 | - self.config["ARCHES"] = "armhf" |
391 | - self.capture_logging() |
392 | - build_livecd_base(self.config) |
393 | - self.assertLogEqual([ |
394 | - "===== Downloading live filesystem images =====", |
395 | - self.epoch_date, |
396 | - "===== Copying images to debian-cd output directory =====", |
397 | - self.epoch_date, |
398 | - ]) |
399 | - output_dir = os.path.join( |
400 | - self.temp_dir, "scratch", project, "bionic", |
401 | - "daily-preinstalled", "debian-cd", "armhf") |
402 | - self.assertTrue(os.path.isdir(output_dir)) |
403 | - touch_files = ["bionic-preinstalled-boot-%s+%s.img" % ( |
404 | - touch_target.ubuntu_arch, touch_target.subarch) |
405 | - for touch_target in Touch.list_targets_by_ubuntu_arch("armhf")] |
406 | - touch_files.extend(["bionic-preinstalled-recovery-%s+%s.img" % ( |
407 | - touch_target.android_arch, touch_target.subarch) |
408 | - for touch_target in Touch.list_targets_by_ubuntu_arch("armhf")]) |
409 | - touch_files.extend(["bionic-preinstalled-system-%s+%s.img" % ( |
410 | - touch_target.android_arch, touch_target.subarch) |
411 | - for touch_target in Touch.list_targets_by_ubuntu_arch("armhf")]) |
412 | - touch_files.extend([ |
413 | - "bionic-preinstalled-touch-armhf.manifest", |
414 | - "bionic-preinstalled-touch-armhf.raw", |
415 | - "bionic-preinstalled-touch-armhf.type", |
416 | - "bionic-preinstalled-touch-armhf.tar.gz", |
417 | - "bionic-preinstalled-touch-armhf.custom.tar.gz", |
418 | - ]) |
419 | - self.assertCountEqual(touch_files, os.listdir(output_dir)) |
420 | - with open(os.path.join( |
421 | - output_dir, "bionic-preinstalled-touch-armhf.type") |
422 | - ) as f: |
423 | - self.assertEqual("tar archive\n", f.read()) |
424 | - for touch_target in Touch.list_targets_by_ubuntu_arch("armhf"): |
425 | - system_img = "bionic-preinstalled-system-%s+%s.img" % ( |
426 | - touch_target.android_arch, touch_target.subarch) |
427 | - recovery_img = "bionic-preinstalled-recovery-%s+%s.img" % ( |
428 | - touch_target.android_arch, touch_target.subarch) |
429 | - self.assertTrue(os.path.exists( |
430 | - os.path.join(output_dir, system_img))) |
431 | - self.assertTrue(os.path.exists( |
432 | - os.path.join(output_dir, recovery_img))) |
433 | - |
434 | - def test_ubuntu_touch(self): |
435 | - self._perform_ubuntu_touch_testing("ubuntu-touch") |
436 | - |
437 | |
438 | class TestBuildImageSet(TestCase): |
439 | def setUp(self): |
440 | diff --git a/lib/cdimage/tests/test_build_id.py b/lib/cdimage/tests/test_build_id.py |
441 | index 7bd6bb3..3063319 100644 |
442 | --- a/lib/cdimage/tests/test_build_id.py |
443 | +++ b/lib/cdimage/tests/test_build_id.py |
444 | @@ -78,21 +78,6 @@ class TestNextBuildId(TestCase): |
445 | self.assertEqual("20130225:1\n", stamp_file.read()) |
446 | |
447 | @mock.patch("time.strftime", return_value="20130225") |
448 | - def test_ubuntu_rtm(self, *args): |
449 | - config = Config(read=False) |
450 | - config.root = self.use_temp_dir() |
451 | - config["PROJECT"] = "ubuntu-touch" |
452 | - config["DIST"] = "ubuntu-rtm/14.09" |
453 | - os.mkdir(os.path.join(self.temp_dir, "etc")) |
454 | - stamp = os.path.join( |
455 | - config.root, "etc", |
456 | - ".next-build-suffix-ubuntu-touch-ubuntu-rtm-14.09-daily") |
457 | - self.assertFalse(os.path.exists(stamp)) |
458 | - self.assertEqual("20130225", next_build_id(config, "")) |
459 | - with open(stamp) as stamp_file: |
460 | - self.assertEqual("20130225:1\n", stamp_file.read()) |
461 | - |
462 | - @mock.patch("time.strftime", return_value="20130225") |
463 | def test_date_suffix(self, *args): |
464 | config = Config(read=False) |
465 | config.root = self.use_temp_dir() |
466 | diff --git a/lib/cdimage/tests/test_config.py b/lib/cdimage/tests/test_config.py |
467 | index ab07f38..3106ff6 100644 |
468 | --- a/lib/cdimage/tests/test_config.py |
469 | +++ b/lib/cdimage/tests/test_config.py |
470 | @@ -40,10 +40,6 @@ class TestSeries(TestCase): |
471 | def test_latest(self): |
472 | self.assertTrue(Series.latest().is_latest) |
473 | self.assertEqual("ubuntu", Series.latest().distribution) |
474 | - self.assertTrue(Series.latest(distribution="ubuntu-rtm").is_latest) |
475 | - self.assertEqual( |
476 | - "ubuntu-rtm", |
477 | - Series.latest(distribution="ubuntu-rtm").distribution) |
478 | self.assertRaises( |
479 | ValueError, Series.latest, distribution="nonexistent") |
480 | |
481 | @@ -73,20 +69,14 @@ class TestSeries(TestCase): |
482 | def test_str(self): |
483 | series = Series.find_by_name("warty") |
484 | self.assertEqual("warty", str(series)) |
485 | - series = Series.find_by_name("ubuntu-rtm/14.09") |
486 | - self.assertEqual("14.09", str(series)) |
487 | |
488 | def test_full_name(self): |
489 | series = Series.find_by_name("utopic") |
490 | self.assertEqual("utopic", series.full_name) |
491 | - series = Series.find_by_name("ubuntu-rtm/14.09") |
492 | - self.assertEqual("ubuntu-rtm/14.09", series.full_name) |
493 | |
494 | def test_format(self): |
495 | series = Series.find_by_name("warty") |
496 | self.assertEqual("warty", "%s" % series) |
497 | - series = Series.find_by_name("ubuntu-rtm/14.09") |
498 | - self.assertEqual("14.09", "%s" % series) |
499 | |
500 | def test_is_latest(self): |
501 | self.assertFalse(all_series[0].is_latest) |
502 | @@ -125,8 +115,6 @@ class TestSeries(TestCase): |
503 | def test_distribution(self): |
504 | series = Series.find_by_name("utopic") |
505 | self.assertEqual("ubuntu", series.distribution) |
506 | - series = Series.find_by_name("ubuntu-rtm/14.09") |
507 | - self.assertEqual("ubuntu-rtm", series.distribution) |
508 | |
509 | |
510 | class TestConfig(TestCase): |
511 | @@ -321,14 +309,6 @@ class TestConfig(TestCase): |
512 | self.assertFalse(config.match_series("-oneiric")) |
513 | self.assertFalse(config.match_series("lucid")) |
514 | self.assertTrue(config.match_series("precise")) |
515 | - self.assertFalse(config.match_series("ubuntu-rtm/*")) |
516 | - self.assertFalse(config.match_series("ubuntu-rtm/14.09-")) |
517 | - config["DIST"] = "ubuntu-rtm/14.09" |
518 | - self.assertTrue(config.match_series("*")) |
519 | - self.assertFalse(config.match_series("ubuntu/*")) |
520 | - self.assertFalse(config.match_series("precise-")) |
521 | - self.assertTrue(config.match_series("ubuntu-rtm/*")) |
522 | - self.assertTrue(config.match_series("ubuntu-rtm/14.09-")) |
523 | |
524 | def test_arches_override(self): |
525 | # If ARCHES is set in the environment, it overrides |
526 | @@ -394,8 +374,6 @@ class TestConfig(TestCase): |
527 | config = Config(read=False) |
528 | config["DIST"] = "utopic" |
529 | self.assertEqual("ubuntu", config.distribution) |
530 | - config["DIST"] = "ubuntu-rtm/14.09" |
531 | - self.assertEqual("ubuntu-rtm", config.distribution) |
532 | |
533 | def test_series(self): |
534 | config = Config(read=False) |
535 | @@ -406,8 +384,6 @@ class TestConfig(TestCase): |
536 | config = Config(read=False) |
537 | config["DIST"] = "utopic" |
538 | self.assertEqual("utopic", config.full_series) |
539 | - config["DIST"] = "ubuntu-rtm/14.09" |
540 | - self.assertEqual("ubuntu-rtm/14.09", config.full_series) |
541 | |
542 | def test_core_series(self): |
543 | config = Config(read=False) |
544 | diff --git a/lib/cdimage/tests/test_livefs.py b/lib/cdimage/tests/test_livefs.py |
545 | index 6ae2697..03681a2 100644 |
546 | --- a/lib/cdimage/tests/test_livefs.py |
547 | +++ b/lib/cdimage/tests/test_livefs.py |
548 | @@ -345,11 +345,6 @@ class TestLiveBuildOptions(TestCase): |
549 | self.assertEqual( |
550 | ["-f", "plain"], live_build_options(self.config, "i386")) |
551 | |
552 | - def test_ubuntu_touch(self): |
553 | - self.config["PROJECT"] = "ubuntu-touch" |
554 | - self.assertEqual( |
555 | - ["-f", "plain"], live_build_options(self.config, "armhf")) |
556 | - |
557 | def test_wubi(self): |
558 | self.config["SUBPROJECT"] = "wubi" |
559 | for series, fstype in ( |
560 | @@ -738,73 +733,6 @@ class TestRunLiveBuilds(TestCase): |
561 | self.assertEqual("Successfully built", builds[1].buildstate) |
562 | self.assertEqual(0, mock_live_build_notify_failure.call_count) |
563 | |
564 | - @skipUnless(launchpad_available, "launchpadlib not available") |
565 | - @mock_strftime(1363355331) |
566 | - @mock.patch("time.sleep") |
567 | - @mock.patch("cdimage.livefs.tracker_set_rebuild_status") |
568 | - @mock.patch("cdimage.livefs.live_build_notify_failure") |
569 | - @mock.patch("cdimage.tests.test_livefs.MockLiveFSBuild._iter_buildstate") |
570 | - @mock.patch("cdimage.launchpad.login") |
571 | - def test_run_live_builds_lp_ubuntu_rtm(self, mock_login, |
572 | - mock_iter_buildstate, |
573 | - mock_live_build_notify_failure, |
574 | - mock_tracker_set_rebuild_status, |
575 | - mock_sleep, *args): |
576 | - self.config["PROJECT"] = "ubuntu-touch" |
577 | - self.config["DIST"] = "ubuntu-rtm/14.09" |
578 | - self.config["IMAGE_TYPE"] = "daily-preinstalled" |
579 | - self.config["ARCHES"] = "armhf i386" |
580 | - osextras.unlink_force(os.path.join( |
581 | - self.config.root, "production", "livefs-builders")) |
582 | - with mkfile(os.path.join( |
583 | - self.config.root, "production", "livefs-launchpad")) as f: |
584 | - print( |
585 | - "ubuntu-touch\tdaily-preinstalled\tubuntu-rtm/*\t*\t" |
586 | - "dogfood/ubuntu-cdimage/ubuntu-touch", file=f) |
587 | - print( |
588 | - "ubuntu-touch\tdaily-preinstalled\t*\t*\t" |
589 | - "ubuntu-cdimage/ubuntu-touch", file=f) |
590 | - self.capture_logging() |
591 | - mock_login.return_value = MockLaunchpad() |
592 | - mock_iter_buildstate.side_effect = lambda: ( |
593 | - chain(["Needs building"] * 3, repeat("Successfully built"))) |
594 | - self.assertCountEqual(["armhf", "i386"], run_live_builds(self.config)) |
595 | - self.assertCountEqual([ |
596 | - "ubuntu-touch-armhf on Launchpad starting at 2013-03-15 13:48:51", |
597 | - "ubuntu-touch-armhf: https://launchpad.example/armhf-build", |
598 | - "ubuntu-touch-i386 on Launchpad starting at 2013-03-15 13:48:51", |
599 | - "ubuntu-touch-i386: https://launchpad.example/i386-build", |
600 | - "ubuntu-touch-armhf on Launchpad finished at 2013-03-15 13:48:51 " |
601 | - "(Successfully built)", |
602 | - "ubuntu-touch-i386 on Launchpad finished at 2013-03-15 13:48:51 " |
603 | - "(Successfully built)", |
604 | - ], self.captured_log_messages()) |
605 | - self.assertEqual(4, mock_tracker_set_rebuild_status.call_count) |
606 | - mock_tracker_set_rebuild_status.assert_has_calls([ |
607 | - mock.call(self.config, [0, 1], 2, "armhf"), |
608 | - mock.call(self.config, [0, 1], 2, "i386"), |
609 | - mock.call(self.config, [0, 1, 2], 3, "armhf"), |
610 | - mock.call(self.config, [0, 1, 2], 3, "i386"), |
611 | - ]) |
612 | - self.assertEqual(3, mock_sleep.call_count) |
613 | - mock_sleep.assert_has_calls([mock.call(15)] * 3) |
614 | - lp = get_launchpad() |
615 | - owner = lp.people["ubuntu-cdimage"] |
616 | - ubuntu_rtm = lp.distributions["ubuntu-rtm"] |
617 | - series = ubuntu_rtm.getSeries(name_or_version="14.09") |
618 | - dases = [ |
619 | - series.getDistroArchSeries(archtag) |
620 | - for archtag in ("armhf", "i386")] |
621 | - self.assertEqual(2, len(dases)) |
622 | - livefs = lp.livefses.getByName( |
623 | - owner=owner, distro_series=series, name="ubuntu-touch") |
624 | - builds = [ |
625 | - livefs.getLatestBuild(distro_arch_series=das) for das in dases] |
626 | - self.assertEqual(2, len(builds)) |
627 | - self.assertEqual("Successfully built", builds[0].buildstate) |
628 | - self.assertEqual("Successfully built", builds[1].buildstate) |
629 | - self.assertEqual(0, mock_live_build_notify_failure.call_count) |
630 | - |
631 | |
632 | class TestLiveCDBase(TestCase): |
633 | def setUp(self): |
634 | diff --git a/lib/cdimage/tests/test_tree.py b/lib/cdimage/tests/test_tree.py |
635 | index f416301..25207f9 100644 |
636 | --- a/lib/cdimage/tests/test_tree.py |
637 | +++ b/lib/cdimage/tests/test_tree.py |
638 | @@ -254,8 +254,6 @@ class TestPublisher(TestCase): |
639 | "preinstalled-server"), |
640 | ("daily-preinstalled", "ubuntu", "bionic", |
641 | "preinstalled-desktop"), |
642 | - ("daily-preinstalled", "ubuntu-touch", "bionic", |
643 | - "preinstalled-touch"), |
644 | ("daily-live", "edubuntu", "lunar", "desktop"), |
645 | ("daily-live", "ubuntu-server", "bionic", "live-server"), |
646 | ("daily-live", "ubuntu", "bionic", "desktop"), |
647 | @@ -861,13 +859,6 @@ class TestDailyTreePublisher(TestCase): |
648 | self.config.root, "scratch", "kubuntu", "hoary", "daily", |
649 | "debian-cd", "i386"), |
650 | self.make_publisher("kubuntu", "daily").image_output("i386")) |
651 | - self.config["DIST"] = "ubuntu-rtm/14.09" |
652 | - self.assertEqual( |
653 | - os.path.join( |
654 | - self.config.root, "scratch", "ubuntu-touch", "ubuntu-rtm", |
655 | - "14.09", "daily-preinstalled", "debian-cd", "armhf"), |
656 | - self.make_publisher( |
657 | - "ubuntu-touch", "daily-preinstalled").image_output("armhf")) |
658 | |
659 | def test_source_extension(self): |
660 | self.assertEqual( |
661 | @@ -920,13 +911,6 @@ class TestDailyTreePublisher(TestCase): |
662 | self.config.root, "www", "full", |
663 | "kubuntu", "hoary", "daily-live"), |
664 | self.make_publisher("kubuntu", "daily-live").publish_base) |
665 | - self.config["DIST"] = "ubuntu-rtm/14.09" |
666 | - self.assertEqual( |
667 | - os.path.join( |
668 | - self.config.root, "www", "full", |
669 | - "ubuntu-touch", "ubuntu-rtm", "14.09", "daily-preinstalled"), |
670 | - self.make_publisher( |
671 | - "ubuntu-touch", "daily-preinstalled").publish_base) |
672 | |
673 | def test_size_limit(self): |
674 | for project, dist, image_type, arch, size_limit in ( |
675 | @@ -1743,14 +1727,6 @@ class TestDailyTreePublisher(TestCase): |
676 | "ubuntu-zh_CN", "daily-live", "desktop", |
677 | "i386")) |
678 | |
679 | - def test_qa_product_ubuntu_touch(self): |
680 | - publisher = self.make_publisher("ubuntu-touch", "daily-preinstalled") |
681 | - self.assertEqual( |
682 | - ("Ubuntu Touch armhf", "iso"), |
683 | - publisher.qa_product( |
684 | - "ubuntu-touch", "daily-preinstalled", "preinstalled-touch", |
685 | - "armhf")) |
686 | - |
687 | def test_qa_product_ubuntu_preinstalled(self): |
688 | publisher = self.make_publisher("ubuntu", "daily") |
689 | self.assertEqual( |
690 | diff --git a/lib/cdimage/tree.py b/lib/cdimage/tree.py |
691 | index bdac6f8..8562fd1 100644 |
692 | --- a/lib/cdimage/tree.py |
693 | +++ b/lib/cdimage/tree.py |
694 | @@ -44,7 +44,7 @@ from cdimage.checksums import ( |
695 | ChecksumFileSet, |
696 | checksum_directory, |
697 | ) |
698 | -from cdimage.config import Series, Touch |
699 | +from cdimage.config import Series |
700 | from cdimage.log import logger, reset_logging |
701 | from cdimage.mirror import trigger_mirrors |
702 | from cdimage import osextras |
703 | @@ -412,8 +412,6 @@ class Publisher: |
704 | if self.image_type.endswith("-preinstalled"): |
705 | if self.project == "ubuntu-server": |
706 | return "preinstalled-server" |
707 | - elif self.project == "ubuntu-touch": |
708 | - return "preinstalled-touch" |
709 | elif self.project == "ubuntu-core": |
710 | return "preinstalled-core" |
711 | else: |
712 | @@ -570,8 +568,6 @@ class Publisher: |
713 | return "preinstalled netbook %s" % cd |
714 | elif publish_type == "preinstalled-active": |
715 | return "preview preinstalled active image" |
716 | - elif publish_type == "preinstalled-touch": |
717 | - return "preinstalled touch image" |
718 | elif publish_type == "preinstalled-core": |
719 | return "preinstalled core image" |
720 | elif publish_type == "wubi": |
721 | @@ -764,10 +760,6 @@ class Publisher: |
722 | sentences.append( |
723 | "The Active Image allows you to unpack a preinstalled preview " |
724 | "of the Plasma Active workspace onto an SD card.") |
725 | - elif publish_type == "preinstalled-touch": |
726 | - sentences.append( |
727 | - "The Preinstalled Touch Image allows you to install a " |
728 | - "preinstalled preview of Ubuntu Touch onto a target device.") |
729 | elif publish_type.startswith("preinstalled-"): |
730 | sentences.append( |
731 | "The %s %s allows you to unpack a preinstalled version of %s " |
732 | @@ -1137,34 +1129,6 @@ class Publisher: |
733 | heading = heading.replace('-', ' ') |
734 | return heading |
735 | |
736 | - def ubuntu_touch_legal_notice(self): |
737 | - yield "<h3>Legal Notice</h3>" |
738 | - yield Paragraph([ |
739 | - "Ubuntu Touch is released for free non-commercial use.", |
740 | - "It is provided without warranty, even the implied warranty of " |
741 | - "merchantability, satisfaction or fitness for a particular use.", |
742 | - "See the licence included with each program for details.", |
743 | - ]) |
744 | - yield Paragraph([ |
745 | - "Some licences may grant additional rights; this notice shall not " |
746 | - "limit your rights under each program's licence.", |
747 | - "Licences for each program are available in the /usr/share/doc " |
748 | - "directory.", |
749 | - "Source code for Ubuntu can be downloaded from %s." % Link( |
750 | - "http://archive.ubuntu.com/", "archive.ubuntu.com"), |
751 | - "Ubuntu, the Ubuntu logo and Canonical are registered trademarks " |
752 | - "of Canonical Ltd.", |
753 | - "All other trademarks are the property of their respective " |
754 | - "owners.", |
755 | - ]) |
756 | - yield Paragraph([ |
757 | - "Ubuntu Touch is released for limited use due to the inclusion of " |
758 | - "binary hardware support files.", |
759 | - "The original components and licenses can be found at: %s." % Link( |
760 | - "https://developers.google.com/android/nexus/drivers", |
761 | - "https://developers.google.com/android/nexus/drivers"), |
762 | - ]) |
763 | - |
764 | def find_images(self, directory, prefix, publish_type): |
765 | images = [] |
766 | prefix_type = "%s-%s" % (prefix, publish_type) |
767 | @@ -1216,7 +1180,7 @@ class Publisher: |
768 | "preinstalled-desktop", "preinstalled-netbook", |
769 | "preinstalled-mobile", "preinstalled-active", |
770 | "preinstalled-server", |
771 | - "preinstalled-touch", "preinstalled-core", "wubi", |
772 | + "preinstalled-core", "wubi", |
773 | "live-core", |
774 | "live-core-desktop", |
775 | "desktop-canary", |
776 | @@ -1727,11 +1691,6 @@ class Publisher: |
777 | if got_iso or got_img: |
778 | print(file=header) |
779 | |
780 | - if self.config.project == "ubuntu-touch": |
781 | - for tag in self.ubuntu_touch_legal_notice(): |
782 | - print(tag, file=header) |
783 | - print(file=header) |
784 | - |
785 | print("<div class='p-table-wrapper'>", file=header) |
786 | |
787 | print( |
788 | @@ -2230,30 +2189,6 @@ class DailyTreePublisher(Publisher): |
789 | else: |
790 | osextras.unlink_force("%s.squashfs" % target_prefix) |
791 | |
792 | - # Flashable Android boot images |
793 | - if os.path.exists("%s.bootimg" % source_prefix): |
794 | - logger.info("Publishing %s abootimg images ..." % arch) |
795 | - shutil.move( |
796 | - "%s.bootimg" % source_prefix, "%s.bootimg" % target_prefix) |
797 | - |
798 | - for touch_target in Touch.list_targets_by_ubuntu_arch(arch): |
799 | - boot_img = "%s-preinstalled-boot-%s+%s.img" % ( |
800 | - self.config.series, touch_target.ubuntu_arch, |
801 | - touch_target.subarch) |
802 | - system_img = "%s-preinstalled-system-%s+%s.img" % ( |
803 | - self.config.series, touch_target.android_arch, |
804 | - touch_target.subarch) |
805 | - recovery_img = "%s-preinstalled-recovery-%s+%s.img" % ( |
806 | - self.config.series, touch_target.android_arch, |
807 | - touch_target.subarch) |
808 | - |
809 | - for image in boot_img, system_img, recovery_img: |
810 | - if os.path.exists(os.path.join(source_dir, image)): |
811 | - logger.info("Publishing %s ..." % image) |
812 | - shutil.move( |
813 | - os.path.join(source_dir, image), |
814 | - os.path.join(target_dir, image)) |
815 | - |
816 | if os.path.exists("%s.custom.tar.gz" % source_prefix): |
817 | logger.info("Publishing %s custom tarball ..." % arch) |
818 | shutil.move( |
819 | @@ -2548,16 +2483,6 @@ class DailyTreePublisher(Publisher): |
820 | for arch in arches: |
821 | if image_base.endswith("-%s" % arch): |
822 | matches = True |
823 | - elif (self.config.project == "ubuntu-touch" and |
824 | - arch == "armhf" and |
825 | - ("-armel+" in image_base or "-armhf+" in image_base)): |
826 | - matches = True |
827 | - elif (self.config.project == "ubuntu-touch" and |
828 | - arch == "i386" and "-i386+" in image_base): |
829 | - matches = True |
830 | - elif (self.config.project == "ubuntu-touch" and |
831 | - arch == "arm64" and "-arm64+" in image_base): |
832 | - matches = True |
833 | elif self.config.subproject == "wubi" and image_base == arch: |
834 | matches = True |
835 | else: |
Requires some slightly non-trivial fix-ups in merge due to the dropping of Chinese / localization support in the meantime, but the obvious conflict resolution is correct and passes tests, so landing as-is.