On Thu, Nov 13, 2003 at 02:45:34AM -0600, Luca - De Whiskey's - De Vitis wrote: > [ also forwarding to zope packagers list ] > On Thu, Nov 13, 2003 at 12:14:27AM +0100, Denis Barbier wrote: > > it looks like the solution proposed by Luca in > > > > http://lists.debian.org/debian-python/2002/debian-python-200211/msg00025.html > > has never been implemented, most (if not all?) Zope packages still ship > > their own templates files. > > > > The right solution is trivial: throw your config and templates files > > away (unless they contain something different from dealing with Zope > > restart), as well as debian/po directory if it does exist, bump > > versioned dependency on zope if needed (the shared/zope/restart question > > was finalized in 2.5.1-2.7 according to its changelog) and get a recent > > postinst file, e.g. zope-cmfcore.postinst. > > And that's all! > > I indeed proposed that solution, but as far as i can read from > debconf-devel(7): > > SHARED TEMPLATES > It's actually possible to have a template and a question that are > shared among a set of packages. All the packages have to provide > an identical copy of the tem- plate in their templates files. This can > be useful if a bunch of packages need to ask the same question, and > you only want to bother the user with it once. Shared templates are > generally put in the shared/ pseudo-directory in the debconf tem- > plate namespace. > > All zope packages should provide the same template. .config files are useless > though.
This was your original point, then Andreas Tille and Federico Di Gregorio replied that this explanation does not apply here because all packages depend on Zope, you agreed and proposed to drop templates, and everyone was happy... but this never happened ;) So let's discuss it again: as Zope packages depend on Zope, there is no reason for them to ship the same templates as the ones already found in zope, this is duplication of work and is painful without any benefit. When Joey wrote the paragraph above, he certainly had in mind the gdm/kdm/xdm case (IIRC the first shared template) or how to select a news server once when installing several news readers. In such cases, packages do not depend on each other, and the paragraph quoted above explain how to work around this problem. If you are still not convinced, please let me know and I will explain it again. > > An alternative is to move templates to zopectl so that they can be > > updated more easily, but I have no idea whether this does make sense. > > I good improvement would have been to create dh_zope command (as part of a > zope-dev) package, which would have been responsible of installing/updating > those files (like code snippets). I meant zopectl for other purpose. > > I'm still too busy dealing with zopectl wich has an higer priority in my TODO > list: i would share my thoughts about dh_zope with any volunteer. As stated above, config and templates files have to be dropped, and packages do no more have to call dh_installdebconf (but of course they still depends on debconf). And postinst might indeed be automatically created by dh_zope. This is very easy, customize the attached postinst-zope script and put it into /usr/share/debhelper/autoscripts/postinst-zope, then dh_zope will automatically insert it. And that's all ;) Hey no, you have to write documentation, of course, and remove current postinst and prerm scripts. HTH Denis
#!/usr/bin/perl -w use strict; use Debian::Debhelper::Dh_Lib; init(); foreach my $package (@{$dh{DOPACKAGES}}) { autoscript($package, "postinst", "postinst-zope"); autoscript($package, "prerm", "prerm-python"); } 1;
if [ "$1" = "configure" ] ; then . /usr/share/debconf/confmodule db_get "shared/zope/restart" || true case "$RET" in configuring) invoke-rc.d zope restart ;; end) touch /var/run/zope.restart ;; esac db_stop fi