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

Re: Review wanted for conffile handling functions in dpkg



Hi!

On Mon, 2010-04-12 at 21:03:25 +0200, Raphael Hertzog wrote:
> On Wed, 31 Mar 2010, Joey Hess wrote:
> > So, I wrote a patch to dpkg in 2008 to add a dpkg-conffile command,
> > that handles renaming and removal of conffiles.
> > 
> > http://lists.debian.org/debian-dpkg/2008/01/msg00143.html
> 
> Based on that work and on http://wiki.debian.org/DpkgConffileHandling
> I prepared a shell library (conffile-hacks.sh currently, I might rename it
> before merge) integrated in dpkg that is meant to be used from maintainer
> scripts. I would be glad if people could test, review and comment.

As I mentioned back then (IIRC), I'd rather have this supported
natively by dpkg, as it will imply two transitions for people, one from
switching from the ad-hoc snippets to this, and another one to the
native support. But obviously it's going to be easier to fix problems
if the code is centralizedi, and the code can be switched to the native
implementation whenever that exists while people switch to use the
native implementation directly. But then people are already complaining
about gratuitous code churn. It will make the lives of new users of
the code snippets way easier, though. So I'd be fine with it as long
as the following two parapgraphs are honoured.

I'd rather not see polluted a dpkg-conffile with this temporary interface
as long as no one has sit down and considered what interface will be
needed by the native tool, and how that might affect a possible
transition to it, etc., to avoid a situation like the dpkg-divert no
rename default, for example.

I also agree with Joey that a shared shell library is just painful
(for execution from non-shell for starters), and this should be a
command, which would preferably still be located under /usr/share/dpkg/,
or whatever appropriate private directory.

> It's here:
> http://git.debian.org/?p=users/hertzog/dpkg.git;a=shortlog;h=refs/heads/pu/conffile-hacks
> 
> I have put some corresponding tests in pkg-tests.git
> (pkg-conffile-obsolete and pkg-conffile-rename):
> http://git.debian.org/?p=users/hertzog/pkg-tests.git;a=shortlog;h=refs/heads/pu/conffile-hacks

> Attached is the script, it's self-documented but it requires a change to
> dpkg that is only in the branch pu/conffile-hacks (the export of the
> variable DPKG_MAINTSCRIPT_NAME with the name of the maintainer script).

I've skimmed over it and besides being a library instead of a command,
and the behaviour change depending on what maintainer script called
it (as I commented on bug #546577), it seems fine.

regards,
guillem


Reply to: