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

Re: dpkg and configuration files



Sorry, I'm getting back from old mail... So I let your entire e-mail.

On Wed, Dec 29, 1999 at 05:46:00PM +0200, Kai Henningsen wrote:
> Recently on Debian-BSD ...
> 
> jeffsh@erols.com (Jeff Sheinberg)  wrote on 23.12.99 in <14434.49305.64257.82821@eden-hda7.local>:
> 
> > Now, I will quote from "The Complete FreeBSD", 2nd edition, by
> > Greg Lehey,
> >
> >     Another problem with pkg_delete is that it might delete files
> >     of the same name which have been replaced by newer packages.
> 
> ... which reminds me that there is still a problem in this area with dpkg.
> 
> Scenario:
> 
> Install the old dhcp-beta stuff.
> 
> Upgrade to the new dhcp stuff.
> 
> Decide to purge the old dhcp-beta packages.
> 
> Oops! Files really belonging to the new dhcp packages were removed.
> 
> Why is that? Because those files weren't mentioned in the .list file, but  
> were instead removed by the postinst, which did (of course) not know about  
> the new dhcp packages.
> 
> This is similar to the mess with the old base package.
> 
> 
> What to do?
> 
> Well, it seems to me moving at least part of the "purge" functionality  
> from the postrm scripts to dpkg might solve most of this problem.
> 
> Say we have a new file listing files which should be removed for "purge".  
> It should probably allow simple wildcards.
> 
> Now dpkg can find out if other packages claim the same files. And it can  
> remove from that list when one package "replaces" another.
> 
> There are, of course, situations where even simple wildcards clashing  
> with, say, non-wildcard entries in another package are non-trivial to  
> resolve. IMO, just erroring out is good enough for these situations.
> 
> Of course, we still need the possibility to manually "purge" for cases too  
> complicated for this, but this should be complicated cases _only_.
> 
> Oh, and this way, dpkg --search will also find what package generated  
> files belong to. (dpkg --search exim.conf currently doesn't list any  
> package, for example.)
> 
> (Incidentally, does dpkg remove .dpkg* versions of config files on purge?  
> It probably should.)

Better will be to have an --add-files <package> <files> ... option to
dpkg so dpkg can handle conflict, search, diversion, etc...

Also, to circumvent diversion, dpkg --get-files <package> <files>...
should return the real name of the files, including any diversions
setting. I don't think this will be really hard to add, except if
we want something performing. Maybe dpkg can check if it's running
and ask the running dpkg (which have all the file list in memory)
to answer in its place?

> 
> MfG Kai
> 
> 

-- 
------------------------------------------------------------------------
Fabien Ninoles        Chevalier servant de la Dame Catherine des Rosiers
aka Corbeau aka le Veneur Gris               Debian GNU/Linux maintainer
E-mail:                                                    fab@tzone.org
WebPage:                                    http://www.tzone.org/~fabien
RSA PGP KEY [E3723845]: 1C C1 4F A6 EE E5 4D 99  4F 80 2D 2D 1F 85 C1 70
------------------------------------------------------------------------


Reply to: