Re: [Pkg-zope-developers] Re: Duplicate debconf templates in zope-* packages
On Thu, 13 Nov 2003, Denis Barbier wrote: 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. I included Joey Hess in my previous mail and do so for forewarding this. Perhaps I might be able to clarify his rationale behind the manual paragraph. 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 Kind regards Andreas.
Re: Duplicate debconf templates in zope-* packages
On Fri, Nov 14, 2003 at 01:28:21PM +0100, Andreas Tille wrote: [...] Hmmm, are you sure that this paragraph in the manual makes sense I guess if a zope package depends from zope all relevant debconf information is available and copying the same stuff over and over makes no sense at all except from enhancing the probability of errors. Sorry, i now realize that i did not in consider policy explanation on what Depends field mean. Perheps some sort of note in that paragraph of debconf-devel would have been useful. I mean something like Including the shared question, is not required if all packages depends on the one which provides the template (see section 7.2. of Debian policy) I'll update all my packages as soon as i can. ciao, -- Luca - De Whiskey's - De Vitis | Elegant or ugly code as well aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have Luca, a wannabe ``Good guy''. | something in common: they local LANG=[EMAIL PROTECTED] | don't depend on the language.
Re: [Pkg-zope-developers] Re: Duplicate debconf templates in zope-* packages
Andreas Tille wrote: On Thu, 13 Nov 2003, Denis Barbier wrote: 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 ;) I'm not familiar with zope's packaging, but I hope you all realize that dependencies are not guaranteed to be satisfied at debconf preconfigure time. That is the reason you sometimes need shared templates. -- see shy jo signature.asc Description: Digital signature
Re: Duplicate debconf templates in zope-* packages
Luca - De Whiskey's - De Vitis wrote: On Fri, Nov 14, 2003 at 01:28:21PM +0100, Andreas Tille wrote: [...] Hmmm, are you sure that this paragraph in the manual makes sense I guess if a zope package depends from zope all relevant debconf information is available and copying the same stuff over and over makes no sense at all except from enhancing the probability of errors. Sorry, i now realize that i did not in consider policy explanation on what Depends field mean. Perheps some sort of note in that paragraph of debconf-devel would have been useful. I mean something like Including the shared question, is not required if all packages depends on the one which provides the template (see section 7.2. of Debian policy) That's not at all accurate. Every package that has a config script that expects to use a template must include a copy of the template in the package. Dependencies will not be honored at preconfigure time. -- see shy jo signature.asc Description: Digital signature
Re: Duplicate debconf templates in zope-* packages
On Fri, Nov 14, 2003 at 11:36:33AM -0500, Joey Hess wrote: That's not at all accurate. Every package that has a config script that expects to use a template must include a copy of the template in the package. Dependencies will not be honored at preconfigure time. Thanks for replying. Actually my proposed sentence is not accurate, but something more might be added to that paragraph. zope-* .postinst and only those files expect a shared question to be available at configuration time. zope package is the only one that is supposed to ask the question (trough .config and .template), hence there is no problem at preconfiguration time. Since all packages need zope to be properly configured before their configuration phase start, there should not be any problem even without preconfiguration. ciao, -- Luca - De Whiskey's - De Vitis | Elegant or ugly code as well aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have Luca, a wannabe ``Good guy''. | something in common: they local LANG=[EMAIL PROTECTED] | don't depend on the language. pgpyQprzan01X.pgp Description: PGP signature
Re: Duplicate debconf templates in zope-* packages
On Fri, 14 Nov 2003, Luca - De Whiskey's - De Vitis wrote: Actually my proposed sentence is not accurate, but something more might be added to that paragraph. zope-* .postinst and only those files expect a shared question to be available at configuration time. zope package is the only one that is supposed to ask the question (trough .config and .template), hence there is no problem at preconfiguration time. Since all packages need zope to be properly configured before their configuration phase start, there should not be any problem even without preconfiguration. This is exactly what I wanted to answer to Joey's remark. Kind regards Andreas.
Re: Duplicate debconf templates in zope-* packages
[ 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. 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. ciao, -- Luca - De Whiskey's - De Vitis | Elegant or ugly code as well aliases: Luca ^De [A-Z][A-Za-z\-]*[iy]'\?s$ | as fine or rude sentences have Luca, a wannabe ``Good guy''. | something in common: they local LANG=[EMAIL PROTECTED] | don't depend on the language.
Re: [Pkg-zope-developers] Re: Duplicate debconf templates in zope-* packages
Le Thu, Nov 13, 2003 at 02:45:34AM -0600, Luca - De Whiskey's - De Vitis a écrit : 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. I start to create it. I use it on my all packages. I can look for create zope-dev. At this time dh_zope take image in Products to move it in /usr/share/zope and made symbolic link. -- Nicolas Ledez pgp0C1zJfgK7s.pgp Description: PGP signature
Re: Duplicate debconf templates in zope-* packages
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
Duplicate debconf templates in zope-* packages
[Cc me on reply, I am not subscribed to this list] Hi there, 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! The shared/zope/restart question has been polished recently on Alioth, but as templates files are duplicated, the last updated package wins. So depending on unpacking order, displayed templates will be fixed or not. I am not saying that all shared templates have to be dealt with this way (which is wrong in the general case), but it works here because packages depend on zope, and it does not hurt if it is not configured yet when postinst is run. 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. Denis