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

Re: "register" files in dpkg database programmatically? (was Re: How Debian Deals with Data)



[Roger Leigh]
> By registering the file as I create it, I completely avoid the
> breakage potential of complex and poorly-tested postrm logic--it's
> completely removed.  It also means that other packages can't
> arbitrarily overwrite it.  It would certainly be very useful for
> e.g. generated files in /var which currently require special handling
> in postrm.

Before seriously proposing this as a core feature in dpkg, we really do
need to figure out which of the 3 behaviors are needed:

- Treat the file as though it were shipped in the package directly.
  This means it is removed on package upgrade, as well as on package
  removal.  This is very straightforward (append the filename to
  /var/lib/dpkg/info/{foo}.list), but perhaps not too useful.

- Do not remove the file on package upgrade, but do remove it when
  removing the package.

- Only remove the file on package purge.  Call it the ucf use case.

I'm just laying out the options, I don't know whether one, two, or all
three options would be sensible.
-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/


Reply to: