Merge lp:~sil2100/ubuntu-system-image/server-fix-pd-builds into lp:ubuntu-system-image/server

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 273
Proposed branch: lp:~sil2100/ubuntu-system-image/server-fix-pd-builds
Merge into: lp:ubuntu-system-image/server
Diff against target: 48 lines (+15/-5)
2 files modified
lib/systemimage/generators.py (+2/-1)
lib/systemimage/tests/test_generators.py (+13/-4)
To merge this branch: bzr merge lp:~sil2100/ubuntu-system-image/server-fix-pd-builds
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Review via email: mp+272445@code.launchpad.net

Commit message

When generating the ubuntu bits, make sure that all the android touch 'hacks' are also executed for pd. Along with an unit test modification.

Description of the change

When generating the ubuntu bits, make sure that all the android touch 'hacks' are also executed for pd. Along with an unit test modification.

This is required to get the ubuntu-pd images working.

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

Since it's really not obvious that "pd" == "pocket-desktop", maybe add some comments? Unless the context (which isn't visible in the diff) makes it clear.

One other comment inlined.

Other than that, the diff on the face of it looks okay to me.

review: Approve
274. By Łukasz Zemczak

Add a comment and do other changes as per Barry's recommendations.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/systemimage/generators.py'
2--- lib/systemimage/generators.py 2015-04-10 17:35:24 +0000
3+++ lib/systemimage/generators.py 2015-09-28 12:08:22 +0000
4@@ -485,7 +485,8 @@
5 entry.name = "system/%s" % entry.name
6 target_tarball.addfile(entry, fileobj=fileptr)
7
8- if options.get("product", "touch") == "touch":
9+ # The touch and pd products are the same
10+ if options.get("product", "touch") in ("touch", "pd"):
11 # FIXME: Will need to be done on the real rootfs
12 # Add some symlinks and directories
13 # # /android
14
15=== modified file 'lib/systemimage/tests/test_generators.py'
16--- lib/systemimage/tests/test_generators.py 2015-03-31 20:51:38 +0000
17+++ lib/systemimage/tests/test_generators.py 2015-09-28 12:08:22 +0000
18@@ -441,10 +441,11 @@
19 None)
20
21 # Working run
22- for device_arch, cdimage_arch, cdimage_product in (
23- ("generic_x86", "i386", "touch"),
24- ("generic_i386", "i386", "core"),
25- ("generic_amd64", "amd64", "core")):
26+ for device_arch, cdimage_arch, cdimage_product, android_hacks in (
27+ ("generic_x86", "i386", "touch", True),
28+ ("generic_x86", "i386", "pd", True),
29+ ("generic_i386", "i386", "core", False),
30+ ("generic_amd64", "amd64", "core", False)):
31 environment['device_name'] = device_arch
32
33 for filename in ("SHA256SUMS",
34@@ -507,6 +508,14 @@
35 os.path.join(self.config.publish_path, "pool",
36 "ubuntu-HASH.tar.xz"))
37
38+ # Check that for touch and pd the android hacks are executed
39+ target_obj = tarfile.open(
40+ os.path.join(self.config.publish_path, "pool",
41+ "ubuntu-HASH.tar.xz"), "r:xz")
42+ if android_hacks:
43+ self.assertIn("system/android", target_obj.getnames())
44+ target_obj.close()
45+
46 for entry in ("ubuntu-HASH.tar.xz", "ubuntu-HASH.tar.xz.asc",
47 "ubuntu-HASH.json", "ubuntu-HASH.json.asc"):
48 os.remove(os.path.join(self.config.publish_path,

Subscribers

People subscribed via source and target branches