Re: dpkg question: preinst run before Depends:?
On Fri, 5 Sep 1997, Ian Jackson wrote:
> So you should not make tetex's preinst depend on dpkg-perl. Only
> Essential packages are guaranteed to be available in preinst scripts.
So we are still looking for the best solution. The situation is the
following: The current preinst scripts of the tetex-* packages use
`dpkg -s' to search for the old tex packages.
If I remember right, this is because dpkg does not support mulitple
"Replaces:" and simple "Conflicts" would leave the user without
information in dselect. The preinst script checks for the old packages and
refuses to install, together with a note how to remove the old packages
Thus, if dpkg could handle multiple Conflicts, all this would be a lot
easier. (Ian, please don't take this as an accusation.)
Since the call there are three (or more) tetex packages which have such a
preinst script, and each of them calls `dpkg -s' 37 times, that will make
3*37=111 calls, which takes to long even on fast computers.
(Note, that this check is done even on completely up-to-date system
whenever a new tetex package comes out. But we can't drop the preinst
scripts, since that would make upgrades from older systems harder.)
As a possible speed up, I considered using Klee's nice dpkg-perl
programming interface to dpkg's db.
I see the following possibilities now:
a) remove the preinst scripts completely and add "Conflicts:"
(This makes the assumption that most people have 1.3 system--I
don't really think that this is the case.)
b) make tetex-* packages "Pre-Depend" on dpkg-perl
(not a good solution)
c) move dpkg-perl into base system
(Note, that there will be a new "perl-base" package which will be
marked "Essential"--if I recall right. We could merge "dpkg-perl"
d) include the (very small) modules from dpkg-perl in the preinst
(This solution is not very nice but would work.)
Please note, that a programming interface to dpkg (i.e. dpkg-perl) is
valuable and it would be good if it can be using in such situations. Also
note, that the "Installed-Size" of dpkg-perl is only 32k.
-- Christian Schwarz
Don't know Perl? email@example.com, firstname.lastname@example.org
Visit PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .