Merge lp:~james-w/linaro-image-tools/architecture-in-filename into lp:linaro-image-tools/11.11

Proposed by James Westby
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 111
Merged at revision: 68
Proposed branch: lp:~james-w/linaro-image-tools/architecture-in-filename
Merge into: lp:linaro-image-tools/11.11
Prerequisite: lp:~james-w/linaro-image-tools/metadata-from-config
Diff against target: 35 lines (+5/-4)
2 files modified
hwpack/hardwarepack.py (+3/-2)
hwpack/tests/test_hardwarepack.py (+2/-2)
To merge this branch: bzr merge lp:~james-w/linaro-image-tools/architecture-in-filename
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle (community) Approve
Review via email: mp+35127@code.launchpad.net

Description of the change

Hi,

A small branch to put the architecture name in the hwpack filename, to tell
them apart and stop them colliding when you build multiple architectures.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Very exciting.

 merge approved

Cheers,
mwh

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hwpack/hardwarepack.py'
--- hwpack/hardwarepack.py 2010-09-10 15:54:08 +0000
+++ hwpack/hardwarepack.py 2010-09-10 16:01:43 +0000
@@ -116,8 +116,9 @@
116 support_suffix = ""116 support_suffix = ""
117 else:117 else:
118 support_suffix = "_%s" % self.metadata.support118 support_suffix = "_%s" % self.metadata.support
119 return "hwpack_%s_%s%s.tar.gz" % (119 return "hwpack_%s_%s_%s%s.tar.gz" % (
120 self.metadata.name, self.metadata.version, support_suffix)120 self.metadata.name, self.metadata.version,
121 self.metadata.architecture, support_suffix)
121122
122 def add_apt_sources(self, sources):123 def add_apt_sources(self, sources):
123 """Add APT sources to the hardware pack.124 """Add APT sources to the hardware pack.
124125
=== modified file 'hwpack/tests/test_hardwarepack.py'
--- hwpack/tests/test_hardwarepack.py 2010-09-10 15:54:08 +0000
+++ hwpack/tests/test_hardwarepack.py 2010-09-10 16:01:43 +0000
@@ -145,13 +145,13 @@
145145
146 def test_filename(self):146 def test_filename(self):
147 hwpack = HardwarePack(self.metadata)147 hwpack = HardwarePack(self.metadata)
148 self.assertEqual("hwpack_ahwpack_4.tar.gz", hwpack.filename())148 self.assertEqual("hwpack_ahwpack_4_armel.tar.gz", hwpack.filename())
149149
150 def test_filename_with_support(self):150 def test_filename_with_support(self):
151 metadata = Metadata("ahwpack", "4", "armel", support="supported")151 metadata = Metadata("ahwpack", "4", "armel", support="supported")
152 hwpack = HardwarePack(metadata)152 hwpack = HardwarePack(metadata)
153 self.assertEqual(153 self.assertEqual(
154 "hwpack_ahwpack_4_supported.tar.gz", hwpack.filename())154 "hwpack_ahwpack_4_armel_supported.tar.gz", hwpack.filename())
155155
156 def get_tarfile(self, hwpack):156 def get_tarfile(self, hwpack):
157 fileobj = StringIO()157 fileobj = StringIO()

Subscribers

People subscribed via source and target branches