python-apt returns architecture == host arch instead of "all"

Bug #733741 reported by Loïc Minier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Invalid
High
Unassigned
apt (Ubuntu)
Fix Released
High
Steve Langasek

Bug Description

Hi

testr run
running=python -m subunit.run tests.test_suite| testr load
======================================================================
FAIL: hwpack.tests.test_builder.HardwarePackBuilderTests.test_builds_correct_contents
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "hwpack/tests/test_builder.py", line 135, in test_builds_correct_contents
    sources_dict, package_spec=package_name))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 345, in assertThat
    % (matchee, matcher, mismatch.describe()))
AssertionError: Match failed. Matchee: "hwpack_ahwpack_1.0_armel.tar.gz"
Matcher: Is a valid hardware pack.
Difference: Differences: [
Differences: [
Differences: [
'all' != u'armel': architecture
]

]
: There was 1 mismatch: The content of path "pkgs/Packages" did not match
]

------------
[...]

id=20, tests=417, failures=26

I guess this is a recent change in apt; it might be an apt bug.

Cheers,

Loïc Minier (lool)
Changed in linaro-image-tools:
importance: Undecided → High
Revision history for this message
James Westby (james-w) wrote :

This is caused by a bug in apt (or python-apt), where it now returns the host architecture rather
than "all" for Architecture: all packages.

Thanks,

James

Loïc Minier (lool)
summary: - hwpack tests fail with newest apt
+ python-apt returns architecture == host arch instead of "all"
Revision history for this message
Julian Andres Klode (juliank) wrote :

As far as I know, it's APT's handling of multi-arch.

Revision history for this message
Steve Langasek (vorlon) wrote :

Yes, this is a behavior change in apt, not in python-apt.

affects: python-apt (Ubuntu) → apt (Ubuntu)
Changed in apt (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
Loïc Minier (lool)
Changed in apt (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.8.13.2ubuntu1

---------------
apt (0.8.13.2ubuntu1) natty; urgency=low

  * merge fixes from debian-sid, most notable the handling of
    arch=all architectures in python-apt (LP: #733741)
  * apt-pkg/aptconfiguration.cc:
    - fix comparing for a empty string

apt (0.8.13.2) unstable; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/deb/dpkgpm.cc:
    - skip --configure if all packages disappeared
  * apt-pkg/vendor.cc, apt-pkg/vendorlist.cc:
    - mark them as deprecated as they are unused
  * apt-pkg/deb/deblistparser.h:
    - enable StripMultiArch by default for ParseDepends
  * debian/apt.conf.autoremove:
    - adapt to new gnumach kernel package naming (Closes: #619337)
  * doc/apt_preferences.5.xml:
    - correct typo spotted by Charles Plessy (Closes: #619088)
    - document ButAutomaticUpgrades together with NotAutomatic
      as suggested by Charles Plessy (Closes: #619083)
  * apt-pkg/depcache.cc:
    - remove pseudo handling leftover from SetReInstall
    - do not change protected packages in autoinstall (Closes: #618848)
  * apt-pkg/pkgcachegen.cc:
    - make "all"->"native" an implementation detail of NewPackage
      rather than rewrite it in higher methods
  * apt-pkg/cacheiterator.h:
    - return "all" instead of native architecture without breaking the abi
      (too much) by extending enum instead of using bitflags (LP: #733741)
  * apt-pkg/aptconfiguration.cc:
    - use dpkg --print-foreign-architectures to get multiarch configuration
      if non is specified with APT::Architectures (Closes: #612958)
  * cmdline/apt-get.cc:
    - do not show simulation notice for non-root commands (Closes: #619072)
    - be able to disable resolver with APT::Get::CallResolver and disable
      auto installation with APT::Get::AutoSolving
  * apt-pkg/deb/deblistparser.cc:
    - create foo:any provides for all architectures for an allowed package
 -- Michael Vogt <email address hidden> Tue, 05 Apr 2011 13:19:56 +0200

Changed in apt (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

Still an issue with apt 0.8.13.2ubuntu1:

FAIL: linaro_image_tools.hwpack.tests.test_builder.HardwarePackBuilderTests.test_builds_correct_contents_multiple_packages
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "linaro_image_tools/hwpack/tests/test_builder.py", line 155, in test_builds_correct_contents_multiple_packages
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 345, in assertThat
    % (matchee, matcher, mismatch.describe()))
AssertionError: Match failed. Matchee: "hwpack_ahwpack_1.0_armel.tar.gz"
Matcher: Is a valid hardware pack.
Difference: Differences: [
Differences: [
Differences: [
'foo' != u'goo': name
'foo_1.1_all.deb' != u'goo_1.2_all.deb': filename
'all' != u'armel': architecture
'1.1' != u'1.2': version
'737e59d917167e7766fd2f17b9a22685' != u'8eb4e9edd9af1ff1d9f434b7f90b0c9f': md5
]

Differences: [
'goo' != u'foo': name
'goo_1.2_all.deb' != u'foo_1.1_all.deb': filename
'all' != u'armel': architecture
'1.2' != u'1.1': version
'8eb4e9edd9af1ff1d9f434b7f90b0c9f' != u'737e59d917167e7766fd2f17b9a22685': md5
]

]
: There were 2 mismatches: The content of path "pkgs/Packages" did not match
]

Maybe python-apt needs to be rebuilt?

Revision history for this message
Steve Langasek (vorlon) wrote :

hmm. :/ ok, reopening.

Changed in apt (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

ok, am told on IRC this should be fixed with a python-apt rebuild after all.

Changed in apt (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Loïc Minier (lool) wrote :

The all != armel issue disappeared with the python-apt rebuild, but there are other regressions; will file a separate bug.

Changed in linaro-image-tools:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.