[Bug 1238616] Re: creating apt cache with rootdir= still considers global apt config
Martin Pitt
martin.pitt at ubuntu.com
Fri Oct 11 15:40:30 UTC 2013
Michal and I debugged this over IRC, and tracked it down. He had an
/etc/apt/apt.conf with explicitly setting Architecture:, and creating an
apt.Cache(rootdir="...") object still takes that global configuration
into account.
The attached test script works on a default installation, downloads the
armhf saucy main index, and creates
/tmp/r/var/lib/apt/lists/ports.ubuntu.com_dists_saucy_main_binary-
armhf_Packages.
But Michal has something like this config:
echo 'APT::Architectures:: "amd64";' | sudo tee
/etc/apt/apt.conf.d/01explicit_arch
After doing that, running the test script shows the same failure:
Err http://ports.ubuntu.com saucy/main amd64 Packages
Get:4 http://ports.ubuntu.com saucy/main armhf Packages [1219 kB]
[...]
E:Some index files failed to download. They have been ignored, or old ones used instead.
So, it might certainly be that I'm using python-apt wrongly here, but I
would certainly expect apt.Cache(rootdir=/path/to/my/sandbox) to not
consider anything from /etc/apt/?
** Attachment added: "test script"
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1238616/+attachment/3874724/+files/test.py
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1238616
Title:
creating apt cache with rootdir= still considers global apt config
Status in “python-apt” package in Ubuntu:
New
Bug description:
I've tried to retrace a unity8 .crash from the phone on my desktop,
using lp:daisy config, but the retrace process bails out after failing
to download i386 and amd64 from ports.ubuntu.com. See the attached log
for details.
The command I used:
⟫ LANG=C apport-retrace -v -S daisy/retracer/config/ -C cache/ -o
unity8.crash _usr_bin_unity8.32011.crash 2>&1 | tee retrace.log
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1238616/+subscriptions
More information about the foundations-bugs
mailing list