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.
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: config[ "dir"] = rootdir
del apt_pkg.config[key]
apt_pkg.
apt_pkg. init_config( )
and then creating the cache using the rootdir argument.