[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#800499: SystemError on unreadable files in sources.list.d



Package: python-apt
Version: 1.1.0~alpha3

Test case:
- sudo touch /etc/apt/sources.list.d/bug.list
- sudo chmod 770 /etc/apt/sources.list.d/bug.list
- python -c "import apt; apt.Cache()"

That triggers a SystemError

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 113, in
__init__
    self.open(progress)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 164, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Opening /etc/apt/sources.list.d/bugs.list -
ifstream::ifstream (13: Permission denied), E:The list of sources could
not be read., E:The package lists or status file could not be parsed or
opened.

The issue is hit sometimes by oneconf users on Ubuntu, see e.g
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1323586


Reply to: