(Jean-Christophe, you could have kept Joey in the CC in your reply)

Hi,

On Thu, 01 Apr 2010, Jean-Christophe Dubacq wrote:
> > The patch still seems good. From the history of
> > http://wiki.debian.org/DpkgConffileHandling , I see only one bugfix has
> > been made to that page since, that should be folded into the patch. It is
> > described here: http://lists.debian.org/debian-devel/2008/03/msg00795.html
> 
> There is also the fact that the code on this page does not deal with the
> abort-upgrade condition. Code doing that (for moving conffile)
> should also test for abort-upgrade in prerm and put back in place the
> conffile;

Is that really worth taking care of? Worst case, the old conffile is freshly
reinstalled and the user changes are lost... but downgrades are not
officially supported by Debian anyway.

Jean-Christophe, are you volunteering to add the support of downgrade in
the dpkg-conffile tool proposed by Joey?

> for deleting conffile, the conffile should not be deleted too
> soon (but moved away and deleted in the postinst/postrm).

Here I tend to agree. Joey, what's the reason for advocating
an early removal in the prerm?

In any case, I tend to agree that we have waited for far too long on this
one. Despite Guillem's will to fix the underlying issue, we should really
provide the piece of code to make it all work right now in dpkg itself.

I will try to merge something during next week-end hopefully. Until then I
would be glad if some people could review Joey's old proposal from
http://lists.debian.org/debian-dpkg/2008/01/msg00143.html
to see if there are problems in the approach.

My only comment is that I'd like to restrain more what the user can do
and less what dpkg-conffile can do. I would suggest to forward all options
of the configuration scripts to dpkg-conffile and let dpkg-conffile mostly
decide by itself if it must do something at that point or not. I would
like also the package to be implicit by default and let dpkg-conffile
use $DPKG_MAINTSCRIPT_PACKAGE to find out the current package.

Instead of requiring the user to do:
+  case "$1" in
+  configure)
+      if dpkg --compare-versions "$2" le "$LASTVERSION"; then
+          dpkg-conffile mv mypackage /etc/pkg_conf /etc/pkg/conf
+      fi
+  esac

He would do:
dpkg-conffile mv $LASTVERSION /etc/pkg.conf /etc/pkg/conf -- postinst "$@"

And in the preinst, it would be the same but "postinst" is replaced by 
"preinst".
That way it would be effectively possible to add support of downgrades at some 
point
if we decided to implement it in dpkg-conffile (provided that we have taken 
care to
have dpkg-conffile hooked in all appropriate places which might mean more than
what's currently required).

More review/suggestions welcome of course before I merge such a new interface.
Joey, if you feel like updating your patch to implement this, feel free to do
it before the WE so that the chances that I merge it on time are higher. :)

Cheers,
-- 
Raphaƫl Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100406125320.ga31...@rivendell

Reply via email to