Comment 9 for bug 1238616

Revision history for this message
Julian Andres Klode (juliank) wrote :

We had that fixed for some time, but had to revert this now, because code broke.

Anyway, you can get that behavior by clearing the config yourself, before creating the cache object; something like:

 for key in apt_pkg.config:
  del apt_pkg.config[key]
apt_pkg.config["dir"] = rootdir

apt_pkg.init_config()

and then creating the cache using the rootdir argument.