Merge lp:~james-w/linaro-image-tools/install-recommends into lp:linaro-image-tools/11.11

Proposed by James Westby
Status: Merged
Merged at revision: 160
Proposed branch: lp:~james-w/linaro-image-tools/install-recommends
Merge into: lp:linaro-image-tools/11.11
Diff against target: 44 lines (+14/-2)
2 files modified
hwpack/packages.py (+3/-1)
hwpack/tests/test_packages.py (+11/-1)
To merge this branch: bzr merge lp:~james-w/linaro-image-tools/install-recommends
Reviewer Review Type Date Requested Status
Steve Langasek (community) Approve
Review via email: mp+40118@code.launchpad.net

Description of the change

Installing recommends was platform dependent before. Now that
we want to install them, ensure that we do that everywhere.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

I believe this is a correct change.

- unlike images, some of which we may want to exclude recommends from because we need to hit a particular disk footprint target, in hwpacks if recommends pulls in unwanted packages we can much more easily (due to questions of scale) change the packages to just not recommend that package anymore.
- installing recommends is always the sensible default given the definition of recommends, and should only be overridden in a case-by-case basis when we know there's a reason to do so.
- certainly as regards the present case of the linux image packages recommending uboot-mkimage and flash-kernel, it's my understanding that the model we're working towards is precisely one where these components should be associated with the hwpacks, not the images.

So this has a +1 from me.

I understand this will also supersede the merge request at <https://code.launchpad.net/~james-w/linaro-image-tools/no-install-recommends/+merge/40106>.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hwpack/packages.py'
2--- hwpack/packages.py 2010-09-24 20:00:05 +0000
3+++ hwpack/packages.py 2010-11-04 16:33:41 +0000
4@@ -297,7 +297,9 @@
5 if self.architecture is not None:
6 apt_conf = os.path.join(self.tempdir, "etc", "apt", "apt.conf")
7 with open(apt_conf, 'w') as f:
8- f.write('Apt {\nArchitecture "%s";\n}\n' % self.architecture)
9+ f.write(
10+ 'Apt {\nArchitecture "%s";\n'
11+ 'Install-Recommends "true";\n}\n' % self.architecture)
12 self.cache = Cache(rootdir=self.tempdir, memonly=True)
13 self.cache.update()
14 self.cache.open()
15
16=== modified file 'hwpack/tests/test_packages.py'
17--- hwpack/tests/test_packages.py 2010-09-15 19:13:06 +0000
18+++ hwpack/tests/test_packages.py 2010-11-04 16:33:41 +0000
19@@ -563,7 +563,7 @@
20 self.addCleanup(cache.cleanup)
21 cache.prepare()
22 self.assertEqual(
23- 'Apt {\nArchitecture "arch";\n}\n',
24+ 'Apt {\nArchitecture "arch";\nInstall-Recommends "true";\n}\n',
25 open(os.path.join(
26 cache.tempdir, "etc", "apt", "apt.conf")).read())
27
28@@ -749,6 +749,16 @@
29 [wanted_package1, wanted_package2],
30 fetcher.fetch_packages(["foo"]))
31
32+ def test_fetches_recommends(self):
33+ wanted_package1 = DummyFetchedPackage("foo", "1.0", recommends="bar")
34+ wanted_package2 = DummyFetchedPackage("bar", "1.0")
35+ source = self.useFixture(
36+ AptSourceFixture([wanted_package1, wanted_package2]))
37+ fetcher = self.get_fetcher([source])
38+ self.assertEqual(
39+ [wanted_package1, wanted_package2],
40+ fetcher.fetch_packages(["foo"]))
41+
42 def test_broken_dependencies(self):
43 wanted_package = DummyFetchedPackage("foo", "1.0", depends="bar")
44 source = self.useFixture(AptSourceFixture([wanted_package]))

Subscribers

People subscribed via source and target branches