[Bug 1701852] Re: (xenial+) apt-cache fails to run if a single sources.list.d entry is not readable
David Kalnischkies
1701852 at bugs.launchpad.net
Wed Jul 5 19:03:36 UTC 2017
Regarding the bug itself: I wouldn't exactly call it a regression, but
it wasn't a super-intended change either. If I see it right I "broke" it
in 2015 by fixing a compiler warning, which indicated that a check which
should have been since ever never applied. So, that it worked before was
just as well a bug… long story short I guess we can make that a warning.
Why an error/warning? Having a different view on what packages are
available depending on if you are root or not is a cause for confusion
by users and tools alike as you confirm the non-root view, but the root
view is applied, which might include additional packages, different
versions or even (additional) unauthenticated packages you haven't
approved… (but the tools think you have). Similar things happen for non-
root preferences/configs and are hence discouraged.
For netrc/auth.conf documentation we have e.g. Debian bug #811181 tracking it. It is just that nobody has written documentation yet. I assume it is waiting for someone who actually wants that feature to write a few sentences about it.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1701852
Title:
(xenial+) apt-cache fails to run if a single sources.list.d entry is
not readable
Status in apt package in Ubuntu:
Triaged
Bug description:
When evaluating:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-
tools/+bug/1700611
On 16.04 and greater, apt-cache fails to run if a single
sources.list.d is not readable (by the current user). On Trusty, the
behavior was a bit more friendly in that it would run and just not
show results from the file that cannot be read.
My expectation is that when run it would warn if any .list file could
not be read, but show results for everything it can see.
This terminal interaction shows the problem (trusty and precise behave
the same here):
ubuntu at precise-esm:~$ ll /etc/apt/sources.list.d/staging-ubuntu-esm-precise.list
-rw------- 1 root root 200 Jun 7 18:35 /etc/apt/sources.list.d/staging-ubuntu-esm-precise.list
ubuntu at precise-esm:~$ apt-cache policy landscape-client
landscape-client:
Installed: (none)
Candidate: 14.12-0ubuntu0.12.04
Version table:
14.12-0ubuntu0.12.04 0
500 http://br.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
100 /var/lib/dpkg/status
12.04.3-0ubuntu1 0
500 http://br.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu at precise-esm:~$ sudo apt-cache policy landscape-client
landscape-client:
Installed: (none)
Candidate: 14.12-0ubuntu5.12.04
Version table:
14.12-0ubuntu5.12.04 0
500 https://extended.security.staging.ubuntu.com/ubuntu/ precise/main amd64 Packages
14.12-0ubuntu0.12.04 0
500 http://br.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
100 /var/lib/dpkg/status
12.04.3-0ubuntu1 0
500 http://br.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
ubuntu at xenial-test:~$ apt-cache search juju
E: Opening /etc/apt/sources.list.d/juju-ubuntu-stable-xenial.list - ifstream::ifstream (13: Permission denied)
E: The list of sources could not be read.
ubuntu at xenial-test:~$
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1701852/+subscriptions
More information about the foundations-bugs
mailing list