LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] package management

[ILUG] package management

Colm Buckley colm at tuatha.org
Thu Mar 15 18:25:49 GMT 2001


> but yes, this is a PITA. how does debian/apt deal with config files
> changing? if it solves that problem elegantly, i'm sold.

Pretty elegantly, IME.  Each .deb has to be written from the ground up
with scripts to "upgrade itself" - it can provide pre-remove,
post-remove, pre-install and post-install scripts.  Usually these look
at the config files and either extract the necessary information for
incorporation in the upgraded installation, or ask you what you want
to do - you can either leave the old file or overwrite it with the new
one, but if the old file has changed at all from the default, it makes
sure to flag it for you, and gives you the option to get a diff, or
manually edit the file as part of the upgrade process.  In any case,
it leaves copies of both the old and new versions of the file in the
relevant directory with an extension to make searching for them easy.

Example : I'm doing my apt-get upgrade, and a new version of Postfix
comes down the pipe.  dpkg notices that my postfix config files have
been changed from the distributed ones.  For each such file, it then
gives me the option to keep my old file (the default), put the new
file in, see a diff of the two files, or shell out to manually edit
things.  If there's some incompatible change introduced, the
pre-install script is supposed (required by the .deb standard) to at
least notify the administrator, if not make the necessary changes
automatically.  Most packages are fairly conservative about this.

If I choose to overwrite my file with the new version, it first
renames my original to file.dpkg-old, so that I can mung things later
if required.  If I keep the old version, it puts the new version in as
file.dpkg-dist, for the same reason.  The result is that a simple
"find /etc -name '*.dpkg-*'" will show you where your configuration
differs from the base distribution.

The only major problem is when an upgraded version of a package
*changes* *its* behaviour, as was the case with curl some time ago.
This, admittedly, did trigger an email to me, but I hadn't realised
that there were scripts on the system relying on the previous
behaviour.

I still find the apt/dpkg combination vastly preferable to anything
else I've seen.  Debian's unwritten philosophy is "do the right thing,
no matter *how* long it takes"...

          Colm

-- 
Colm Buckley, NewWorld Commerce, 16 South Cumberland St., Dublin 2, Ireland.
Personal: +353 87 2469146 / colm at tuatha.org   / http://www.tuatha.org/~colm/
Business: +353 1 4334334  / colm at nwcgroup.com / http://www.nwcgroup.com/
The most common withdrawal symptom is a wet spot.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell