0.9.3 regression: Setting APT::Architecture now downloads wrong indexes

Bug #1288171 reported by Martin Pitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Debian)
Fix Released
Unknown
python-apt (Ubuntu)
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned

Bug Description

trusty-proposed now got python-apt 0.9.3.1 which, compared to trusty's 0.9.1ubuntu1 regresses the support for using "sandboxes" with a different architecture, with e. g.

  apt.apt_pkg.config.set('APT::Architecture', 'armhf')

This can be seen in apport's autopkgtest, which now fails the backend_apt_dpkg.test_install_packages_armhf test (https://jenkins.qa.ubuntu.com/job/trusty-adt-apport/144/ARCH=i386,label=adt/consoleText):

======================================================================
ERROR: test_install_packages_armhf (__main__.T)
install_packages() for foreign architecture armhf
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 441, in update
    pulse_interval)
SystemError: W:GPG error: http://ddebs.ubuntu.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ECDCAD72428D7C01, W:Failed to fetch http://ports.ubuntu.com/dists/precise/main/binary-i386/Packages 404 Not Found [IP: 91.189.88.140 80]
, E:Some index files failed to download. They have been ignored, or old ones used instead.

Note that it now tries to download "binary-i386/", not "binary-armhf/" as configured.

Direct reproducer:

apt-get source apport
cd apport-*
cp backends/packaging-apt-dpkg.py apport/packaging_impl.py
test/run backend_apt_dpkg.test_install_packages_armhf

I'll try to come up with a standalone reproducer.

Martin Pitt (pitti)
tags: added: block-proposed regression-release trusty
tags: added: regression-proposed
removed: regression-release
Changed in python-apt (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

minimal standalone reproducer. Note that this always uses /tmp/sandbox/ for easier investigation, and does not clean it up. So you need to rm -r it in between runs.

tags: added: qa-daily-testing
Martin Pitt (pitti)
summary: - 0.9.3 regresssion: Setting APT::Architecture now downloads wrong indexes
+ 0.9.3 regression: Setting APT::Architecture now downloads wrong indexes
Steve Langasek (vorlon)
tags: added: regression
removed: regression-proposed
Revision history for this message
Martin Pitt (pitti) wrote :

Removing packages from trusty-proposed:
 python-apt 0.9.3.1 in trusty
[...]
Comment: introduces regression (#1288171)
Remove [y|N]? y

tags: removed: block-proposed
Changed in python-apt (Ubuntu Trusty):
status: New → Won't Fix
Revision history for this message
Julian Andres Klode (juliank) wrote :

This was a small change (done in 0.9.2) to the way rootdir is handled in apt.Cache(), by resetting configuration before reading the files from the container. I reverted this change for now in 0.9.3.2. It's uploaded to Debian and will hit the Debian archive in the next hours.

Changed in python-apt (Debian):
status: Unknown → Confirmed
Changed in python-apt (Ubuntu Trusty):
status: Won't Fix → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

python-apt is still blocked in -proposed due to tests failing on pyflakes errors, otherwise this bug should be fixed now.

Changed in python-apt (Ubuntu Trusty):
status: Triaged → Fix Committed
Changed in python-apt (Debian):
status: Confirmed → Fix Released
Revision history for this message
Julian Andres Klode (juliank) wrote :

The same tests ran successfully during the build, and there is no reason they should fail in autopkgtest. Especially not on files that were specifically excluded from the pyflakes test. I don't know what's happening there.

Revision history for this message
Martin Pitt (pitti) wrote :

Julian: This looks like a recent regression in autopkgtest, it now seems to duplicate the unpacked source tree:

There is /tmp/adt-run.KaKPDN/dsc0-build/python-apt-0.9.3.2/tests/old/test_extract_archive.py and
/tmp/adt-run.KaKPDN/dsc0-build/python-apt-0.9.3.2/python-apt-0.9.3.2/tests/old/test_extract_archive.py, i. e. it copies the python-apt-0.9.3.2 directory into itself.

Revision history for this message
Martin Pitt (pitti) wrote :

@Julian: Fixed in autopkgtest 2.9.2, just uploaded to sid. I'll sync it to trusty in a few hours when it got imported, then re-run the python-apt test. Sorry for the trouble!

Revision history for this message
Martin Pitt (pitti) wrote :

The test succeeded now.

Now it's held back by the failing aptdaemon test, I'll see to funnel this through anyway.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 0.9.3.2

---------------
python-apt (0.9.3.2) unstable; urgency=high

  * Revert "* apt/cache.py:" (rootdir change) (Closes: #741251) (LP: #1288171)

    We cannot reset the configuration when rootdir is specified in
    apt.Cache(). This reopens: #728274.

 -- Julian Andres Klode <email address hidden> Mon, 10 Mar 2014 14:32:53 +0100

Changed in python-apt (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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