Merge lp:~james-w/linaro-image-tools/add-dot-list-to-filenames into lp:linaro-image-tools/11.11

Proposed by James Westby
Status: Merged
Merged at revision: 73
Proposed branch: lp:~james-w/linaro-image-tools/add-dot-list-to-filenames
Merge into: lp:linaro-image-tools/11.11
Prerequisite: lp:~james-w/linaro-image-tools/add-script
Diff against target: 60 lines (+6/-6)
3 files modified
hwpack/hardwarepack.py (+1/-1)
hwpack/testing.py (+1/-1)
hwpack/tests/test_hardwarepack.py (+4/-4)
To merge this branch: bzr merge lp:~james-w/linaro-image-tools/add-dot-list-to-filenames
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+35131@code.launchpad.net

Description of the change

Hi,

Guilherme pointed out that sources.list.d files must have a .list suffix
to be considered by apt. We decided that hwpacks must have this already,
to make the installation code simpler.

This is a simple change to make that happen.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good, passes all tests.

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Sorry for double posting, I did not notice I had already reviewed this

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hwpack/hardwarepack.py'
2--- hwpack/hardwarepack.py 2010-09-10 16:26:01 +0000
3+++ hwpack/hardwarepack.py 2010-09-10 16:26:01 +0000
4@@ -186,7 +186,7 @@
5 tf.create_dir(self.SOURCES_LIST_DIRNAME)
6 for source_name, source_info in self.sources.items():
7 tf.create_file_from_string(
8- self.SOURCES_LIST_DIRNAME + "/" + source_name,
9+ self.SOURCES_LIST_DIRNAME + "/" + source_name + ".list",
10 "deb " + source_info + "\n")
11 # TODO: include sources keys etc.
12 tf.create_dir(self.SOURCES_LIST_GPG_DIRNAME)
13
14=== modified file 'hwpack/testing.py'
15--- hwpack/testing.py 2010-09-10 16:26:01 +0000
16+++ hwpack/testing.py 2010-09-10 16:26:01 +0000
17@@ -283,7 +283,7 @@
18 "sources.list.d", type=tarfile.DIRTYPE))
19 for source_id, sources_entry in self.sources.items():
20 matchers.append(HardwarePackHasFile(
21- "sources.list.d/%s" % source_id,
22+ "sources.list.d/%s.list" % source_id,
23 content="deb " + sources_entry + "\n"))
24 matchers.append(HardwarePackHasFile(
25 "sources.list.d.gpg", type=tarfile.DIRTYPE))
26
27=== modified file 'hwpack/tests/test_hardwarepack.py'
28--- hwpack/tests/test_hardwarepack.py 2010-09-10 16:26:01 +0000
29+++ hwpack/tests/test_hardwarepack.py 2010-09-10 16:26:01 +0000
30@@ -233,7 +233,7 @@
31 hwpack.add_apt_sources({'ubuntu': source})
32 tf = self.get_tarfile(hwpack)
33 self.assertThat(
34- tf, HardwarePackHasFile("sources.list.d/ubuntu",
35+ tf, HardwarePackHasFile("sources.list.d/ubuntu.list",
36 content="deb " + source + "\n"))
37
38 def test_adds_multiple_sources_list_files(self):
39@@ -243,10 +243,10 @@
40 hwpack.add_apt_sources({'ubuntu': source1, 'linaro': source2})
41 tf = self.get_tarfile(hwpack)
42 self.assertThat(
43- tf, HardwarePackHasFile("sources.list.d/ubuntu",
44+ tf, HardwarePackHasFile("sources.list.d/ubuntu.list",
45 content="deb " + source1 + "\n"))
46 self.assertThat(
47- tf, HardwarePackHasFile("sources.list.d/linaro",
48+ tf, HardwarePackHasFile("sources.list.d/linaro.list",
49 content="deb " + source2 + "\n"))
50
51 def test_overwrites_sources_list_file(self):
52@@ -257,7 +257,7 @@
53 hwpack.add_apt_sources({'ubuntu': new_source})
54 tf = self.get_tarfile(hwpack)
55 self.assertThat(
56- tf, HardwarePackHasFile("sources.list.d/ubuntu",
57+ tf, HardwarePackHasFile("sources.list.d/ubuntu.list",
58 content="deb " + new_source + "\n"))
59
60 def test_creates_sources_list_gpg_dir(self):

Subscribers

People subscribed via source and target branches