SystemError: E:Opening /etc/apt/sources.list.d/private-ppa.launchpad.<something>list - ifstream::ifstream (13: Permission denied)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-apt
When creating a Cache instance with:
cache = apt.Cache()
if any of the sources file is not readable by the current user, we get this trace:
cache = apt.Cache()
File "/usr/lib/
self.
File "/usr/lib/
self.
SystemError: E:Opening /etc/apt/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: python-apt 0.7.100.2ubuntu2
ProcVersionSign
Uname: Linux 2.6.38-7-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Thu Mar 31 15:09:10 2011
ProcEnviron:
LANGUAGE=en_US:en
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: python-apt
UpgradeStatus: No upgrade log present (probably fresh install)
There's nothing we can do here. APT needs read access to all sources.list, configuration, and preferences files. Marking a sources.list file as unreadable is not supported, and useless, as the cache and /var/lib/apt/lists/ will contain the data from the repository anyway.