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

Re: Perl files in base.



Christian Schwarz wrote:
> 
> I still don't understand the reason (is this just me? how do the
> others think about this?). If a package installs /usr/bin/foo, why
> can't this program be used in the "postinst" script?
> 

Well, probably I've skipped some part of my reasoning so, I'll try to be
more deep :-)

Probably there is not a problem in using "installed" modules inside a
postinst script, but ... there are also preinst, postrm and prerm
scripts. Some of these scripts aren't only called during "normal"
installation, but are also called during wind up, the reversal path that
dpkg uses to rebuild a stable state when the installation fails. The
intere process is described in the programming manual (it was there last
time I sought, if it hasn't been moved to a new manual :-) and is quite
complicated, although very clever.

What I meant was that we cannot make a policy that says 
 "a maintainer can use a perl module installed by the package inside
  the script postinst but not in prerm, and in postrm only if it's a
  rainy day"

For sake of semplicity we should say that 
 "because in some installation script the maintainer cannot use a perl
  module not included in the perl-base package or supplied by a package
  in which his package pre-depends, THEN it is better NOT to use such
  perl module in ANY installation script."

But if someone that understands the process VERY well, like Ian, comes
and say "it's safe there" than we could say so, although the semplicity
continues to suggest me to make a policy that covers ALL the
installation scripts (are only four, no more).

To explain why I have this position, I can tell you that in my first
package I prepared a single script which tested its calling name and act
consequently (later I changed that, no problem). It is so easy to move
code from postinst to postrm because of the logical flow ...


I hope I've been plain and not too rude :-)

Fabrizio
-- 
| fpolacco@icenet.fi    fpolacco@debian.org    fpolacco@pluto.linux.it
| Pluto Leader - Debian Developer & Happy Debian 1.3.1 User - vi-holic
| 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E



Reply to: