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 -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
import apt import os import shutil # prepare sandbox dirs apt_root = '/tmp/sandbox' os.makedirs(os.path.join(apt_root, 'etc', 'apt')) # switch to armhf; set up apt sources apt.apt_pkg.config.set('APT::Architecture', 'armhf') with open(os.path.join(apt_root, 'etc', 'apt', 'sources.list'), 'w') as f: f.write('deb http://ports.ubuntu.com/ trusty main\n') # set up apt cache c = apt.Cache(rootdir=apt_root) # update indexes c.update(apt.progress.text.AcquireProgress())
Attachment:
signature.asc
Description: Digital signature