Merge lp://qastaging/~james-w/linaro-image-tools/include-dependencies into lp://qastaging/linaro-image-tools/11.11

Proposed by James Westby
Status: Merged
Merged at revision: 97
Proposed branch: lp://qastaging/~james-w/linaro-image-tools/include-dependencies
Merge into: lp://qastaging/linaro-image-tools/11.11
Prerequisite: lp://qastaging/~james-w/linaro-image-tools/obey-include-debs
Diff against target: 774 lines (+487/-45)
7 files modified
hwpack/builder.py (+1/-0)
hwpack/config.py (+32/-19)
hwpack/packages.py (+132/-20)
hwpack/testing.py (+4/-1)
hwpack/tests/test_builder.py (+40/-0)
hwpack/tests/test_config.py (+26/-0)
hwpack/tests/test_packages.py (+252/-5)
To merge this branch: bzr merge lp://qastaging/~james-w/linaro-image-tools/include-dependencies
Reviewer Review Type Date Requested Status
Guilherme Salgado (community) code Approve
Review via email: mp+35458@code.qastaging.launchpad.net

Description of the change

Hi,

This branch makes use of the IsolatedAptCache.set_installed_packages
method in order to "ignore" packages and so not download them. In addition
to that it starts to download the dependency tree of the requested packages,
pruning at the the ignored packages.

This is so that hwpacks start to snapshot more state, which helps them stay
more useful over time.

The main driver for the change is being able to bisect the hwpack contents
over the last few days to find problems, which isn't easy with a package
archive.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Alexander Sack (asac) wrote :

When running

./linaro-hwpack-create ../hwpacks/linaro-omap3 1235

with patch below (same with assume-installed=linaro-headless), i get:

./linaro-hwpack-create ../hwpacks/linaro-omap3 1235
Traceback (most recent call last):
  File "./linaro-hwpack-create", line 23, in <module>
    builder.build()
  File "/tmp/pp/hwpacks/configs/include-dependencies/hwpack/builder.py", line 42, in build
    download_content=self.config.include_debs)
  File "/tmp/pp/hwpacks/configs/include-dependencies/hwpack/packages.py", line 438, in fetch_packages
    if p.is_inst_broken]))
hwpack.packages.DependencyNotSatisfied: Unable to satisfy dependencies of apt-utils, base-files, cron, dbus, ifupdown, liblocale-gettext-perl, libtext-charwidth-perl, libtext-iconv-perl, module-init-tools, netbase, plymouth, procps, rsyslog, udev, util-linux

Patch for hwpack:
--- a/configs/hwpacks/linaro-omap3 2010-09-13 13:29:31 +0000
+++ b/configs/hwpacks/linaro-omap3 2010-09-14 22:54:19 +0000
@@ -1,13 +1,14 @@
 [hwpack]
 name=linaro-omap3
 architectures=armel
 origin=Linaro
 maintainer=Linaro Platform <email address hidden>
 support=supported
 packages=linux-image-linaro-omap u-boot-linaro-omap3-beagle x-loader-omap xserver-xorg-video-omap3
+assume-installed=ubuntu-minimal linaro-headless

 [ubuntu]
 sources-entry=http://ports.ubuntu.com/ maverick main universe

 [linaro]
 sources-entry=http://ppa.launchpad.net/linaro-maintainers/overlay/ubuntu maverick main

Revision history for this message
James Westby (james-w) wrote :

It seems like it can't install ubuntu-minimal. Unfortunately the APIs here seem to
be quite poor, giving us little information. I'll look to see if I can find a way
to get some more information about the problem.

Thanks,

James

160. By James Westby

Merged obey-include-debs into include-dependencies.

161. By James Westby

Thread Provides, Replaces and Breaks through to the Packages files.

162. By James Westby

Some improvements to PackageFetcher.

Revision history for this message
James Westby (james-w) wrote :

Hi,

Finally tracked down the problem and fixed it. It led to a few more
changes than before, so please let me know if you would like me to
break the branch up for review.

Thanks,

James

163. By James Westby

Merged obey-include-debs into include-dependencies.

164. By James Westby

Merged obey-include-debs into include-dependencies.

Revision history for this message
Guilherme Salgado (salgado) wrote :

Hi James,

This looks good, I have just a couple comments.

129 + :ivar provides: the Provides string that the package has, i.e. the
130 + provides as specified in debian/control. May be None if the
131 + package has none.
132 + :type provides: str or None
133 + :ivar provides: the Replaces string that the package has, i.e. the
134 + replaces as specified in debian/control. May be None if the
135 + package has none.
136 + :type provides: str or None
137 + :ivar provides: the Breaks string that the package has, i.e. the
138 + breaks as specified in debian/control. May be None if the
139 + package has none.

You've changed the descriptions (after c-n-p) but not the names. ;)

250 + if broken:
251 + # If this happens then there is a bug, as we should have
252 + # caught this problem earlier
253 + raise DependencyNotSatisfied(
254 + "Unable to satisfy dependencies of %s" %
255 + ", ".join(broken))

In these cases I prefer to use an AssertionError, which should not be caught by callsites and is better at conveying that this is a bug.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches