Debian Bug report logs - #229715
apt: Add a "postinst command spool"

Package: general; Maintainer for general is debian-devel@lists.debian.org;

Reported by: Pierre THIERRY <nowhere.man@levallois.eu.org>

Date: Mon, 26 Jan 2004 05:33:01 UTC

Severity: wishlist

Done: Holger Levsen <holger@layer-acht.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#229715; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Pierre THIERRY <pierre.thierry@moine-fou.org>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Pierre THIERRY <pierre.thierry@moine-fou.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apt: Add a "postinst command spool"
Date: Mon, 26 Jan 2004 06:29:00 +0100
[Message part 1 (text/plain, inline)]
Package: apt
Version: 0.5.20
Severity: wishlist

When similar packages are installed, apt is likely to run some identical
command from the postinst scripts multiple times, and this is
inefficiently time-consuming (e.g. mkfontdir or ldconfig).

Apt should include a manner to add some commands in a spool, and those
commands would be run only when all packages have been unpacked.

-- Package-specific info:

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bateleur.arcanes 2.4.21-bateleur #1 SMP mer jui 30 14:21:14 CEST 2003 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages apt depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libgcc1                     1:3.3.2-4    GCC support library
ii  libstdc++5                  1:3.3.2-4    The GNU Standard C++ Library v3

-- no debconf information


-- 
pierre.thierry@moine-fou.org
OpenPGP 0xD9D50D8A
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#229715; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 229715@bugs.debian.org (full text, mbox):

From: Matt Zimmerman <mdz@debian.org>
To: Pierre THIERRY <pierre.thierry@moine-fou.org>, 229715@bugs.debian.org
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: Sun, 25 Jan 2004 23:41:41 -0800
reassign 229715 general
thanks

On Mon, Jan 26, 2004 at 06:29:00AM +0100, Pierre THIERRY wrote:

> Package: apt
> Version: 0.5.20
> Severity: wishlist
> 
> When similar packages are installed, apt is likely to run some identical
> command from the postinst scripts multiple times, and this is
> inefficiently time-consuming (e.g. mkfontdir or ldconfig).
> 
> Apt should include a manner to add some commands in a spool, and those
> commands would be run only when all packages have been unpacked.

I know of no reason why such a scheme would require any specific support
from apt.

-- 
 - mdz



Bug reassigned from package `apt' to `general'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Pierre THIERRY <pierre.thierry@moine-fou.org>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #17 received at 229715@bugs.debian.org (full text, mbox):

From: Pierre THIERRY <pierre.thierry@moine-fou.org>
To: 229715@bugs.debian.org
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: Tue, 27 Jan 2004 01:15:57 +0100
[Message part 1 (text/plain, inline)]
> > Apt should include a manner to add some commands in a spool, and
> > those commands would be run only when all packages have been
> > unpacked.
> I know of no reason why such a scheme would require any specific
> support from apt.

The spool itself could be external to APT, but this spool has still to
be called automatically when all packages have been installed. And they
should be kept in an unconfigured state until the commands have been
exectued, as if they were part of the success of postinst.

To be very efficient, in fact, the spool should just provide a way to
APT to link commands to packages, for APT to leave in an unconfigured
state only the relevant packages, when some commands failed in the
spool.

Asynchronously,
le Moine Fou
-- 
pierre.thierry@moine-fou.org
OpenPGP 0xD9D50D8A
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #22 received at 229715@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Pierre THIERRY <pierre.thierry@moine-fou.org>
Cc: 229715@bugs.debian.org
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: 27 Jan 2004 05:04:28 +0100
Pierre THIERRY <pierre.thierry@moine-fou.org> writes:

> > > Apt should include a manner to add some commands in a spool, and
> > > those commands would be run only when all packages have been
> > > unpacked.
> > I know of no reason why such a scheme would require any specific
> > support from apt.
> 
> The spool itself could be external to APT, but this spool has still to
> be called automatically when all packages have been installed. And they
> should be kept in an unconfigured state until the commands have been
> exectued, as if they were part of the success of postinst.
> 
> To be very efficient, in fact, the spool should just provide a way to
> APT to link commands to packages, for APT to leave in an unconfigured
> state only the relevant packages, when some commands failed in the
> spool.
> 
> Asynchronously,
> le Moine Fou
> -- 
> pierre.thierry@moine-fou.org
> OpenPGP 0xD9D50D8A

And if I install packages with dpkg?

How is the spool any different from an actual postinst file?

MfG
        Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Pierre THIERRY <pierre.thierry@moine-fou.org>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #27 received at 229715@bugs.debian.org (full text, mbox):

From: Pierre THIERRY <pierre.thierry@moine-fou.org>
To: 229715@bugs.debian.org
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: Tue, 27 Jan 2004 14:16:00 +0100
[Message part 1 (text/plain, inline)]
> And if I install packages with dpkg?

There would be two solutions: the spool could be disabled, and the
command used to store a command in the spool would execute it
immediately, or dpkg should also trigger the spool after installing a
package.

As dpkg can install many packages in one invocation, the spool should be
used.

> How is the spool any different from an actual postinst file?

When you install a plenty of font packages, each package will, in its
postinst, run one or many mkfontdir. When an Apache module is installed,
you will be prompted if you want the configuration files to be modified
and Apache reloaded for each module package. There is also ldconfig, and
so on...

With the spool, because these actions are needed only once, they are
triggered only once, when all files are present.

Quickly,
le Moine Fou
-- 
pierre.thierry@moine-fou.org
OpenPGP 0xD9D50D8A
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #32 received at 229715@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Pierre THIERRY <pierre.thierry@moine-fou.org>
Cc: 229715@bugs.debian.org
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: 28 Jan 2004 05:07:54 +0100
Pierre THIERRY <pierre.thierry@moine-fou.org> writes:

> > And if I install packages with dpkg?
> 
> There would be two solutions: the spool could be disabled, and the
> command used to store a command in the spool would execute it
> immediately, or dpkg should also trigger the spool after installing a
> package.
> 
> As dpkg can install many packages in one invocation, the spool should be
> used.
> 
> > How is the spool any different from an actual postinst file?
> 
> When you install a plenty of font packages, each package will, in its
> postinst, run one or many mkfontdir. When an Apache module is installed,
> you will be prompted if you want the configuration files to be modified
> and Apache reloaded for each module package. There is also ldconfig, and
> so on...
> 
> With the spool, because these actions are needed only once, they are
> triggered only once, when all files are present.
> 
> Quickly,
> le Moine Fou

Ahh, that makes much more sense.

Yes. I support the general idea. But it should be at the dpkg level.

Its probably also more usefull to have a spool of things to run
_after_ configuring packages. All font packages would enqueue an
"update font" into the spool, apache modules an "update apache",
anything with a menu item "update menu" and after all packages are
configured dpkg would run the spool. The spool would be a set (no two
"update font" entries). Spool jobs could also be set to detach itself
(like updating man-db).

Scheduling something to be run just once in an install/upgrade session
is quite complicated currently. A clean and common mechanism for it
would be nice. I was looking for that just last week.

Using it for ldconfig might be a problem though, since postinst
scripts might need ldconfig to have been run for the previous package
before they can function properly.

MfG
        Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Agustin Martin Domingo <agustin.martin@hispalinux.es>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #37 received at 229715@bugs.debian.org (full text, mbox):

From: Agustin Martin Domingo <agustin.martin@hispalinux.es>
To: 229715@bugs.debian.org
Cc: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, Pierre THIERRY <pierre.thierry@moine-fou.org>
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: Mon, 02 Feb 2004 13:46:47 +0100
Goswin von Brederlow wrote:
> 
> Scheduling something to be run just once in an install/upgrade session
> is quite complicated currently. A clean and common mechanism for it
> would be nice. I was looking for that just last week.

I was thinking about something for the LaTeX packages, where texhash or 
its equivalent is run by each package postinst, when running it once at 
the very end would be enough

An quick, unsafe and dirty approach:

postinst:

echo "texhash" > /var/lib/dpkg/hooks/texhash.postinst

for each package requiring the TeX database to be updated.

dpkg doing, after running maintainer scripts, something like

$postinst_hooks=the list of postinst hooks
for i in $postinst_hooks; do
  sh $i && rm $i
done

To be safer not everything should be allowed as a hook, having 
pre-defined hooks somewhere and allowing only to run them, and probably 
many other things should be done to make it really work.

Cheers,

-- 
Agustin



Information forwarded to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org:
Bug#229715; Package general. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to debian-devel@lists.debian.org. Full text and rfc822 format available.

Message #42 received at 229715@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Agustin Martin Domingo <agustin.martin@hispalinux.es>
Cc: 229715@bugs.debian.org, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, Pierre THIERRY <pierre.thierry@moine-fou.org>
Subject: Re: Bug#229715: apt: Add a "postinst command spool"
Date: 04 Feb 2004 14:25:29 +0100
Agustin Martin Domingo <agustin.martin@hispalinux.es> writes:

> Goswin von Brederlow wrote:
> > Scheduling something to be run just once in an install/upgrade
> > session
> 
> > is quite complicated currently. A clean and common mechanism for it
> > would be nice. I was looking for that just last week.
> 
> I was thinking about something for the LaTeX packages, where texhash
> or its equivalent is run by each package postinst, when running it
> once at the very end would be enough
> 
> 
> An quick, unsafe and dirty approach:
> 
> postinst:
> 
> echo "texhash" > /var/lib/dpkg/hooks/texhash.postinst
> 
> for each package requiring the TeX database to be updated.
> 
> dpkg doing, after running maintainer scripts, something like
> 
> $postinst_hooks=the list of postinst hooks
> for i in $postinst_hooks; do
>    sh $i && rm $i
> done
> 
> To be safer not everything should be allowed as a hook, having
> pre-defined hooks somewhere and allowing only to run them, and
> probably many other things should be done to make it really work.

I think the texhash package should provide the hook and each package
could call "dpkg-hook --activate texhash <calling package>" or
something. The hook provided could be any binary (usually shell
script) and gets the list of packages (<calling package> argument)
invoking it. dpkg-hook or dpkg --activate-hook or something could be
used. The first has the advantage that it can be written easily and
seperate from dpkg but it wouldn't run the hooks synchron after dpkg
is done and errors couldn't be reported.

MfG
        Goswin




Bug reassigned from package `general' to `!'. Request was from Pierre THIERRY <nowhere.man@levallois.eu.org> to control@bugs.debian.org. Full text and rfc822 format available.

Bug reassigned from package `!' to `general'. Request was from Pierre THIERRY <nowhere.man@levallois.eu.org> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug submitter from Pierre THIERRY <pierre.thierry@moine-fou.org> to Pierre THIERRY <nowhere.man@levallois.eu.org>. Request was from Pierre THIERRY <nowhere.man@levallois.eu.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Holger Levsen <holger@layer-acht.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Pierre THIERRY <nowhere.man@levallois.eu.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #53 received at 229715-done@bugs.debian.org (full text, mbox):

From: Holger Levsen <holger@layer-acht.org>
To: 229715-done@bugs.debian.org
Subject: dpkg has triggers now
Date: Mon, 8 Sep 2008 14:29:15 +0200
[Message part 1 (text/plain, inline)]
Hi,

dpkg has support for triggers now, thus closing.


regards,
	Holger
[Message part 2 (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 07 Oct 2008 07:27:33 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 16:12:19 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.