Bug#696332: lsb-release: release/codename depend on a successful apt-get
Axel Beckert <[email protected]> Wed, 3 Aug 2016 22:16:48 +0200
| Newsgroups | gmane.linux.debian.devel.lsb |
|---|---|
| Organization | The Debian Project |
| Message-ID | <20160803201648.GA6552__19238.2389599972$1470255695$gmane$org@sym.noone.org> |
Control: found -1 9.20160629 Hi Didier, Didier 'OdyX' Raboud wrote: > > If an apt-get update fails (i.e. no internet connection), the lsb > > codename will change to "n/a", which shouldn't happen. Release changes > > to "testing/unstable". I just ran into this on a uptodate Debian Sid system, but the reason seems a different one than varacanero has. The issue only happens for me if I run "lsb_release -a" as non-privileged user. It's also easier to reproduce for me: As normal user: → lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux unstable (sid) Release: unstable Codename: sid So far everything looks fine. Then use dpkg (not apt/apt-get/aptitude) to install a debian package which is either not yet installed or already installed with a different version: # dpkg -i some.deb (Reinstalling a package at the same version does not seem to trigger this issue.) Now the output looks like this for any unprivileged user: → lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux testing/unstable Release: testing/unstable Codename: n/a > How does your /etc/debian_version look like ? And what is the output > of `apt-cache policy` ? → cat /etc/debian_version stretch/sid → apt-cache policy E: Problem renaming the file /var/cache/apt/pkgcache.bin.JkcuIW to /var/cache/apt/pkgcache.bin - rename (1: Operation not permitted) W: You may want to run apt-get update to correct these problems E: The package cache file is corrupted The latter output is very likely the reason for this issue. To "fix" this, run _any_ command which causes a regeneration of apt's package list cache as root. E.g. running "lsb_release -a" as root already suffices and then it also works again for any unprivileged user again. But of course "apt update" (without network issues) also fixes this. Hope this helps and contains enough information to allow the removal of the "moreinfo" tag. Regards, Axel