FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-08-2010, 01:32 PM
Michael Prokop
 
Default Bug#396388: should allow hooks to abort build

* Joey Hess <joeyh@debian.org> [Tue Oct 31, 2006 at 01:39:55PM -0500]:

> mkinitramfs is not a set -x script, and so when call_scripts runs a hook
> script, any error is ignored.

I guess you meant "set -e".

> In some cases, a hook script needs to abort the initramfs build. For
> example, then nslu2-tools hook script can detect issues, like a missing
> ixp ethernet driver, that will make the box unusable, and needs to be
> able to abort the initramfs build in these situations.

Full ACK.

> Currently the only way for a hook script to abort the build is a nasty
> hack. Since call_scripts sources /conf/param.conf, a hook script could
> create that file, and make it exit 1. Of course, that's beyond gross,
> and I won't do it. :-)



> Please provide a mechanism for hook scripts to abort a build. Note that
> in the past, if a hook script exited nonzero, the build did abort, so my
> guess is that there are few hook scripts that exit nonzero in cases
> where the build would continue. However, if you don't feel that's safe
> now, an alternative would be to check for a flag file in the initramfs
> tree, which a hook script could create to indicate that the build needs
> to be aborted.

A "set -e ... set +e" inside call_scripts() would be sufficient
AFAICS as the existing scripts seem to exit != 0 only iff there's a
real problem. So we should just honor that and if people need a more
flexible way we could provide it as well later on.

maks, any objections against adding "set -e"? I'd take care of it.

regards,
-mika-
 
Old 06-09-2010, 02:26 AM
maximilian attems
 
Default Bug#396388: should allow hooks to abort build

On Tue, Jun 08, 2010 at 03:32:32PM +0200, Michael Prokop wrote:
> * Joey Hess <joeyh@debian.org> [Tue Oct 31, 2006 at 01:39:55PM -0500]:
>
> > mkinitramfs is not a set -x script, and so when call_scripts runs a hook
> > script, any error is ignored.
>
> I guess you meant "set -e".
>
> > In some cases, a hook script needs to abort the initramfs build. For
> > example, then nslu2-tools hook script can detect issues, like a missing
> > ixp ethernet driver, that will make the box unusable, and needs to be
> > able to abort the initramfs build in these situations.
>
> Full ACK.
>
> > Currently the only way for a hook script to abort the build is a nasty
> > hack. Since call_scripts sources /conf/param.conf, a hook script could
> > create that file, and make it exit 1. Of course, that's beyond gross,
> > and I won't do it. :-)
>
>
>
> > Please provide a mechanism for hook scripts to abort a build. Note that
> > in the past, if a hook script exited nonzero, the build did abort, so my
> > guess is that there are few hook scripts that exit nonzero in cases
> > where the build would continue. However, if you don't feel that's safe
> > now, an alternative would be to check for a flag file in the initramfs
> > tree, which a hook script could create to indicate that the build needs
> > to be aborted.
>
> A "set -e ... set +e" inside call_scripts() would be sufficient
> AFAICS as the existing scripts seem to exit != 0 only iff there's a
> real problem. So we should just honor that and if people need a more
> flexible way we could provide it as well later on.
>
> maks, any objections against adding "set -e"? I'd take care of it.

please not too many changes just before release,
there are strange hook scripts out there.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100609022608.GE18484@baikonur.stro.at">http://lists.debian.org/20100609022608.GE18484@baikonur.stro.at
 
Old 06-09-2010, 11:12 AM
Michael Prokop
 
Default Bug#396388: should allow hooks to abort build

* maximilian attems <max@stro.at> [Wed Jun 09, 2010 at 04:26:08AM +0200]:
> On Tue, Jun 08, 2010 at 03:32:32PM +0200, Michael Prokop wrote:
> > * Joey Hess <joeyh@debian.org> [Tue Oct 31, 2006 at 01:39:55PM -0500]:

> > > Please provide a mechanism for hook scripts to abort a build. Note that
> > > in the past, if a hook script exited nonzero, the build did abort, so my
> > > guess is that there are few hook scripts that exit nonzero in cases
> > > where the build would continue. However, if you don't feel that's safe
> > > now, an alternative would be to check for a flag file in the initramfs
> > > tree, which a hook script could create to indicate that the build needs
> > > to be aborted.

> > A "set -e ... set +e" inside call_scripts() would be sufficient
> > AFAICS as the existing scripts seem to exit != 0 only iff there's a
> > real problem. So we should just honor that and if people need a more
> > flexible way we could provide it as well later on.

> > maks, any objections against adding "set -e"? I'd take care of it.

> please not too many changes just before release,
> there are strange hook scripts out there.

It costed me quite some time in fixing things in automated builds
because the hooks didn't work as expected but i-t returned with exit
code 0. So IMO this would be an important Q/A step we should take
into consideration for Squeeze. Let's discuss that if you're back.

regards,
-mika-
 
Old 06-15-2010, 05:02 PM
Michael Prokop
 
Default Bug#396388: should allow hooks to abort build

tags 396388 + pending
thanks

* Michael Prokop <mika@debian.org> [Wed Jun 09, 2010 at 01:12:13PM +0200]:
> * maximilian attems <max@stro.at> [Wed Jun 09, 2010 at 04:26:08AM +0200]:
> > On Tue, Jun 08, 2010 at 03:32:32PM +0200, Michael Prokop wrote:
> > > * Joey Hess <joeyh@debian.org> [Tue Oct 31, 2006 at 01:39:55PM -0500]:

> > > > Please provide a mechanism for hook scripts to abort a build. Note that
> > > > in the past, if a hook script exited nonzero, the build did abort, so my
> > > > guess is that there are few hook scripts that exit nonzero in cases
> > > > where the build would continue. However, if you don't feel that's safe
> > > > now, an alternative would be to check for a flag file in the initramfs
> > > > tree, which a hook script could create to indicate that the build needs
> > > > to be aborted.

> > > A "set -e ... set +e" inside call_scripts() would be sufficient
> > > AFAICS as the existing scripts seem to exit != 0 only iff there's a
> > > real problem. So we should just honor that and if people need a more
> > > flexible way we could provide it as well later on.

> > > maks, any objections against adding "set -e"? I'd take care of it.

[...]

After discussion ACKed and implemented, will be provided with next
i-t upload.

regards,
-mika-
 

Thread Tools




All times are GMT. The time now is 07:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org