[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/debian_version - the penny drops



On Wed, Jun 15, 2005 at 02:01:26AM -0600, Bob Proulx wrote:
> 
> David Jardine wrote:
> > When upgrading to Sarge, I was asked if I wanted to keep my old 
> > entry in /etc/debian_version or have it replaced by the package's 
> > version.  
> 
> You must have modified it from the previous package in some way.  (Or 
> at least dpkg thought you did.)  

Yes, I had done - just to see what effect it might have.

>                                  You can look at the old copy that
> would be saved as .dpkg-old to compare.  It is the md5sum that matters
> so whitespace counts.

It was the md5sum check that I didn't know about.

> 
> > I was surprised to see that the default was to keep the old entry 
> > (which explains why people using the --assume-yes option would 
> > not see a change).
> 
> Files in /etc are conffiles and are treated specially.  If the
> sysadmin modifies the files then packages need to preserve them and
> ask if they should be overwritten.

Yes, I understand that conffiles generally should stay.  Before the 
penny dropped (ie, before I realised that this file was purely for 
the sysadmin's benefit and not relied on by other parts of the 
system), it seemed that updating this particular file by default 
would have been more logical.  Now I know better.

> If the file was pristine and matched the md5sum of the previous
> package then it would not be thought to have changed and would have
> been replaced automatically.  

So I was wrong.  Anyone who always ignored the file would have it 
updated every time by default.

>                               But if a file in /etc has been changed
> then dpkg will ask you if you want to keep your version (by default)
> or take the new version.  Generally this is a good practice.
> 
> Bob

Thank you very much for your clear explanation.  I think I'm getting
the hang of these things ... slowly. :)

Cheers,
David

-- 
David Jardine

"Running Debian GNU/Linux and
loving every minute of it."  -L. von Sacher-M.(1835-1895)



Reply to: