Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was testing a few things and was wondering about the difference between --auto-deconfigure and --unpack.

dpkg --auto-deconfigure --install P.deb

If P has a Break field such as:

Break: B

and B is currently installed, then dpkg deconfigures B with a new status of "half-configured."

Similarly, you could "unpack" B first:

dpkg --install B.deb
...
dpkg --unpack B.deb
dpkg --install P.deb

In which case B new status is "unpacked".

However, in both cases the /etc/B.conf file stays right there. So it looks like the package is still fully installed.

My question is: Why wouldn't dpkg remove or rename B.conf? Because when I just do the --unpack the configuration file is named:

/etc/B.conf.dpkg-new

which makes sense. In that case B is really not configured!

It seems to be that the --auto-deconfigure or --unpack commands should also rename the /etc/B.conf as /etc/B.conf.dpkg-new then a --configure can restore the file as expected.

I guess that most software do not care whether a .conf exists and thus whether it is there or not doesn't make much difference in the end. Would that be the reason why they can as well leave it in place?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Unless the package is purged, it's configuration files won't be deleted.

Configuration files can be modified by users, so we don't delete them unless requested.

share|improve this answer
    
Still, the status between dpkg --unpack and dpkg --install + dpkg --unpack is not the same. It seems to me that then the --configure would have to handle a quite special case... –  Alexis Wilke Apr 10 '13 at 20:15
    
What matters is that it isn't configured. Not precisely how much it is configured. It's perfectly acceptable for a sysadmin to provide a configuration file for a package before unpacking it, for example. –  tumbleweed Apr 11 '13 at 11:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.