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

Re: Should ucf be of priority required?

On Sat, Dec 05 2009, Patrick Schoenfeld wrote:

        Short Answer: hell no.

        Read below for why that would be a bad idea.

> when testing my packages with piuparts I noticed an inability of
> our package management. Dpkg does not have support for management
> of dynamically generated configuration files. Therefore some packages
> now use ucf.
> The basic usage is somewhat like
> - Registering config files to ucf on installation
> - Using it when configuring the package to merge configuration updates
>   and local changes
> - Unregistering config files to ucf on purge

> The crux is the last point. For a good reason postrm must not require
> tools it depends on to be around when removing the package itself.
> So the call of ucf looks something like that:
>     if which ucf >/dev/null; then
>         ucf --purge /etc/foo.conf
>     fi    
> That is okay, as long as ucf is around.

        And if ucf is not around, why bother cleaning up the ucf cache?
 When ucf is purged, it will remove its own darned cache.

> But as soon as it isn't the purge of a package is succesful while
> leaving modified files around.  So the effect is that a purge does not
> "remove everything".

        This is where things break down. ucf --purge does not do what
 you think it does, it by no means removes the configuration files. You
 remove the configuration files, not ucf.

> Do we really want that? Should ucf be 'required' to avoid that?

        What purpose would that serve?

Never try to teach a pig to sing; it wastes your time and it annoys the
Manoj Srivastava <srivasta@debian.org> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: