apt.Cache(rootdir='/') causes PermissionError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
The apport test case test_run_
Running following test script as non-root will fail:
```
#!/usr/bin/python3
import apt
apt.Cache(
```
$ ./test
Traceback (most recent call last):
File "./test", line 3, in <module>
apt.
File "/usr/lib/
self.
File "/usr/lib/
open(rootdir + f, "w").close()
PermissionError: [Errno 13] Permission denied: '//etc/
description: | updated |
rootdir generally expects a writable directory, but it seems like a nice idea to make it not write a sources.list if sources.list.d exist