Score:0

How does dpkg choose to replace or not replace a configuration file?

ph flag

I created a package to install postfix with my own setup files. For example, I want to have my own /etc/postfix/virtual in that package.

That works great and I verified, the file is listed as a configuration file (it is part of the conffiles list). I can update it in my package and the postinst script will run the postmap command to make sure the .db is up to date.

However, while doing some testing, I changed a few rules in my installed version /etc/postfix/virtual file, manually ran postmap /etc/postfix/virtual in my console to update the .db file. That worked as expected. The test passed.

Now I put the changes (and a few more) inside my package, but when I installed the package, nothing happened. I did not get a .dpkg version, nor a warning about the fact that it was updated and may need to be replaced by the programmer's version. The file I manually updated while testing was still right there unchanged.

I am thinking this may come from the file extension (it has none...) but still, I'm wondering why is dpkg not asking me to replace that file? Is there a way for me to force a replacement of such files? (in total, I have over 200 files in my package repository, most of which are configuration files, so it is important that I know that it will properly replace those when I make changes in my repo!)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.