linaro-hwpack-create fails to build arndale-octa on Ubuntu 14.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Image Tools |
Fix Released
|
Critical
|
Fathi Boudra | ||
python-debian (Debian) |
Fix Released
|
Unknown
|
Bug Description
linaro-
Below shows how to reproduce the problem.
Also I included two proposed patches, which I think resolve the problem. I tested the proposed fixes on arndale-octa on 14.04 and 12.04.
To reproduce the crash:
On a 14.04 machine:
sudo apt-get update
sudo apt-get upgrade
mkdir repro
cd repro
sudo apt-get install --reinstall python-
git clone https:/
linaro-
Expected result:
The following files should be created in the working directory
hwpack_
hwpack_
Actual Result:
Python assertion:
Traceback (most recent call last):
File "/usr/bin/
builder.build()
File "/usr/lib/
fetcher.
File "/usr/lib/
", ".join(broken))
AssertionError: Weirdly unable to satisfy dependencies of dh-python
Proposed Fix 1: (multi-arch.patch)
This dh-python Assertion is thrown while the builder.py is making a list of packages to ignore by feeding python-apt with a generated dpkg/status. python-apt on 14.04 marks dh-python is_inst_broken.
Note that the dh-python package includes a Multi-Arch Depends: header (Depends: python3:any).
Note that in packages.py the Multi-Arch: header is not written to the generated dpkg/status
I do not know what specifically has changed in Multi-Arch or python-apt between 12.04 to 14.04 that causes this change in behaviour, however I do think passing along Multi-Arch: headers is logical.
The fix: (multi_arch.patch)
Any time a pre_depends clause is read or written in packages.py, make sure multi_arch is also read or written.
cd /usr/share/pyshared
sudo patch -p1 < multi_arch.patch
The result:
After applying the patch, the above problem is not reproducible.
However linaro-
Traceback (most recent call last):
File "/usr/bin/
builder.build()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
debcontrol = DebFile(
File "/usr/lib/
compressed_
File "/usr/lib/
" (expected one of: %s)" % candidates)
debian.
Fix 2 (gzip.patch attached in a separate update)
The error above is thrown when debian.Debfile is trying to unpack the DATA_PART of something built by dpkg-deb.
Note that the DebError expects one of .gz, bz2, lzma.
Note that in 14.04, default compression for dpkg-deb has changed:
man dpkg-deb on 14.04:
-Zcompress-type
man dpkg-deb on 12.04:
-Zcompress-type
So the proposed fix is to specify gzip when building the .deb file in PackageMaker:
ie change this argument list:
['dpkg-deb', '-b', packaging_dir],
to
['dpkg-deb', '-b', '-Zgzip', packaging_dir],
cd /usr/share/pyshared
sudo patch -p1 < gzip.patch
The result:
After applying both packages the above problems are no longer reproducible.
The hwpack is created in the working directory as described in Expected Results above.
Changed in linaro-image-tools: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
assignee: | nobody → Fathi Boudra (fboudra) |
milestone: | none → 2014.04 |
Changed in linaro-image-tools: | |
status: | In Progress → Fix Released |
Changed in python-debian (Debian): | |
status: | Unknown → Fix Released |
attached the second fix