Merge lp:~james-w/linaro-image-tools/architecture-support into lp:linaro-image-tools/11.11
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | 105 |
Merged at revision: | 66 |
Proposed branch: | lp:~james-w/linaro-image-tools/architecture-support |
Merge into: | lp:linaro-image-tools/11.11 |
Prerequisite: | lp:~james-w/linaro-image-tools/add-packages-to-hwpack |
Diff against target: |
413 lines (+115/-56) 5 files modified
hwpack/hardwarepack.py (+4/-2) hwpack/packages.py (+19/-5) hwpack/testing.py (+2/-8) hwpack/tests/test_hardwarepack.py (+30/-19) hwpack/tests/test_packages.py (+60/-22) |
To merge this branch: | bzr merge lp:~james-w/linaro-image-tools/architecture-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle (community) | Approve | ||
Review via email:
|
This proposal supersedes a proposal from 2010-09-02.
Description of the change
Hi,
Here's a rather simple branch to add architecture support through the code
we have now.
I just updated the spec to state that ARCHITECTURE is a required field in
the metadata, so that's now a required argument to the constructor of the
corresponding class, and it is output in the __str__ method.
Also the Package classes get architecture as an ivar, such that we can
track which architecture they are for, which leads to the change in the
get_packages_file function, which can now stop hardcoding "all".
The dummy test package object defaults to "all" as that way the tests
will work on multiple architectures without updating.
However, that leaves a gap, so I added a couple of new tests to ensure
that we fetch packages from the right architecture.
In order to support cross-build of hardware packs I stole a trick from
the chdist tool, which allows us to tell apt to pretend it is on a
different architecture. I added a test to peek inside the implementation
and check we were writing the config correctly, but the two added tests
check that it has the desired effect.
There's still a gap, as noted in the spec, about how we specify the
architectures to build for, as I'm not sure whether it should be in
the configuration file or on the command line, or some combination
of the two. This will mainly depend on how we want to hook it in to
lexbuilder I think. At least now all the infrastructure is in place
to build for any arch that we like.
Thanks,
James
Looks fine to me!