[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#741251: python-apt 0.9.3 regression: Setting APT::Architecture now downloads wrong indexes from the host arch



Control: tag -1 confirmed

On Mon, Mar 10, 2014 at 01:34:33PM +0100, Martin Pitt wrote:
> Package: python3-apt
> Version: 0.9.3
> 
> Hello,
> 
> Since the upgrade from 0.9.1 to 0.9.3, which 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 attached minimal reproducer. It works with
> python-apt 0.9.1, but with 0.9.3 it tries to download the amd64
> indexes:
> 
>    Err http://ports.ubuntu.com trusty/main amd64 Packages
>    [...]
>   File "/usr/lib/python3/dist-packages/apt/cache.py", line 441, in update
>     pulse_interval)
>   SystemError: W:Failed to fetch http://ports.ubuntu.com/dists/trusty/main/binary-amd64/Packages  404  Not Found
>   , E:Some index files failed to download. They have been ignored, or old ones used instead.
> 
> I'm using http://ports.ubuntu.com/ here as this more clearly
> demonstrates the problem (x86 are on archive.u.c., armhf, powerpc etc.
> on ports.u.c.)
> 
> Thanks for considering,
> 
> Martin
Thank you for your report. git bisect tells me:

5e76e9fccee519c63602562dc4065deb3f97748b is the first bad commit
commit 5e76e9fccee519c63602562dc4065deb3f97748b
Author: Michael Vogt <mvo@debian.org>
Date:   Sat Nov 23 08:51:44 2013 +0100

    * apt/cache.py:
      - when using apt.Cache(rootdir=/some/dir) only read the APT
        configuration from this rootdir instead of /etc (closes: #728274)

Which makes sense, as that commit clears the config first, and then
reinitialises, in order to use the config from the rootdir. Which
does not work if you want to configure things using the API.

I reverted this in 0.9.3.2. You should then be able to sync 0.9.3.2
into Ubuntu (you had 0.9.3.1 in there for a short time it seems, so
no further changes seem needed).

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Please do not top-post if possible.

Attachment: pgpTtgF0Oe8Er.pgp
Description: PGP signature


Reply to: