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

Re: show all Suggests packages not installed



On Tuesday 13 May 2003 07:31 pm, Brian May wrote:
> On Tue, May 13, 2003 at 09:21:33AM -0700, Keegan Quinn wrote:
> > On Monday 12 May 2003 04:40 pm, Brian May wrote:
> > > Also, just blindly purging packages can be dangerous, in some cases old
> > > packages will purge files used by newer packages that are still used by
> > > the system.
> >
> > I'm pretty sure that would be a bug.  You should report this behavior if
> > you see it.  Although I won't deny this happens, purging completely
> > unused packages is generally a good idea, unless you want your system
> > building up a nice history of everything it has ever been used for.
>
> However, there is no good solution.
>
> eg. assume package a and a-beta conflict.
>
> Package a postinst creates a /etc/a.conf file. ie. a configuration file,
> not a conffile.
>
> Naturally the purge has to remove it.
>
> However, the system adminstrator installs package
> a-beta instead.
>
> This removes package a (because of the conflict) but doesn't run the
> purge script.
>
> Years latter, adminstrator say "I can purge
> package a".
>
> He does so.
>
> Package a-beta stops working.
>
> Reason: when purging package a, the postinst script has no way of
> knowing that /etc/a.conf is still being used by package a-beta, and
> erases it.
>
> The only solution I think is if dpkg were to take over responsibility
> for deleting configuration files, so that the postrm script doesn't have
> to worry.

I think that in this situation, package a should check if a-beta is installed 
during its postrm purge, and avoid taking over...  Is there some reason you 
think this doesn't work?

Certainly dpkg handling would be cleaner, but since configuration file formats 
often change, it might not be quite so easy to implement.  There are other 
tools and concepts for dealing with that problem, though..  (Debconf, UCF, 
three-way diffs, different configuration file location..)

 - Keegan

(PS: No need to Cc me, I'm on the list.)



Reply to: