#681893 debconf should create /var/cache/debconf if it doesn't exist

Package:
debconf
Source:
debconf
Submitter:
Thiago Jung Bauermann
Date:
2021-06-20 08:15:03 UTC
Severity:
normal
#681893#5
Date:
2012-07-17 14:17:43 UTC
From:
To:
I just restored my system from backup, and my backup excluded /var/cache
hence /var/cache/debconf didn't exist anymore.

This effectivelly broke dpkg:

Setting up man-db (2.5.7-8) ...
debconf: DbDriver "config": could not open /var/cache/debconf/config.dat
dpkg: error processing man-db (--configure):
 subprocess installed post-installation script returned error exit status 1

A web search quickly revealed the solution:

# mkdir /var/cache/debconf

debconf should silently create the /var/cache/debconf directory instead
of failing with an error and crippling the system's package system in the
process, temporarily freaking out the user.

I'm marking the bug as important because of that. IMHO a bug which breaks
dpkg (even if the workaround is simple) is significant...

#681893#16
Date:
2021-06-20 08:12:01 UTC
From:
To:
I do not believe that this is true, and it is definitely not generally
true because not all programs accessing /var/cache/$something/ do that
with root privileges.
So, while it is expected that files may disappear at any time from
/var/cache/ the structure of subdirectories should be preserved.