I recently had an odd problem where I would install zsh
(apt-get install zsh
) but it would not install the config files - specifically /etc/zsh/zshenv
and friends.
Following some considerable time and effort, I managed to track down this log entry:
deferred_configure '/etc/zsh/zshenv' (= '/etc/zsh/zshenv') useredited=1 distedited=0 what=202
And this explanation:
Removing the file counts as 'editing' it, because for many configuration files the absence of a file is meaningful.
Now, as it happens, I had deleted the /etc/zsh
directory, so this would all make sense - except that I had also done apt-get remove zsh
!!
So, given that I have uninstalled zsh, when I come to reinstall it, how come it is surprised by the absence of configuration files? They wouldn't be present on a fresh system - that is, one without zsh installed - so how does it know they were there previously?
And how do I stop it?
I know I can pass --force-confmiss
, but that's not the point. Indeed, I don't believe this can be done when using apt-get
in any case.
I don't want to change how programs are installed. Instead, I want to know how dpkg determines that files which it wouldn't expect to exist in the first place have been deleted by the user. What is the difference between a file that has been deleted, and one that never existed? Is it something to do with apt-get --purge
?