Bug#696332: lsb-release: release/codename depend on a successful apt-get

Axel Beckert <[email protected]> Thu, 4 Aug 2016 00:38:07 +0200
Newsgroups gmane.linux.debian.devel.lsb
Organization The Debian Project
Message-ID <20160803223806.GW3597__5261.04070381752$1470263971$gmane$org@sym.noone.org>
Hi again,

Axel Beckert wrote:
> > 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

There's another fact which is required to let that happen:
/var/cache/apt needs to be world-writable.

Yes, that sounds like a bad idea, but happened if it is a tmpfs mount
point with the default options, like e.g. this /etc/fstab entry:

  none /var/cache/apt tmpfs size=8G 0 0

(Thanks to juliank for the right hint! :-)

So in this case, you can consider it a configuration issue, but still
a nice way to reproduce the effect of erroring out "apt-cache policy".
:-)

		Regards, Axel