Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-02 Thread Ola Lundqvist
Hi On Thu, Aug 02, 2007 at 08:55:52AM +0200, Marc Haber wrote: > On Thu, Aug 02, 2007 at 08:25:06AM +0200, Ola Lundqvist wrote: > > +general_varmove() { > > +PREFIX=$1 > > +STORE=$2 > > +SIFS=$IFS > > +IFS=" > > +" > > Why is the IFS needed here? Otherwise it can not handle varia

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-02 Thread Ola Lundqvist
Hi again On Thu, Aug 02, 2007 at 08:57:38AM +0200, Marc Haber wrote: > On Thu, Aug 02, 2007 at 08:17:30AM +0200, Ola Lundqvist wrote: > > I do the other way around. I have prepared a patch that you can look at > > actually. I have not tested it yet though, but it should work in > > principle. > >

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-02 Thread Marc Haber
On Thu, Aug 02, 2007 at 08:17:30AM +0200, Ola Lundqvist wrote: > I do the other way around. I have prepared a patch that you can look at > actually. I have not tested it yet though, but it should work in > principle. Looks good, and I begin to understand you way of operation. As long as I do not n

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Thu, Aug 02, 2007 at 08:25:06AM +0200, Ola Lundqvist wrote: > +general_varmove() { > +PREFIX=$1 > +STORE=$2 > +SIFS=$IFS > +IFS=" > +" Why is the IFS needed here? > +LIST=$(set | grep "^[a-zA-Z][a-zA-Z0-9_]*_$PREFIX" | sed -e "s|=.*||;") > +for PVAR in $* ; do This loo

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi I have tested the following and it seems to work. Full patch attached. Regards, // Ola -- - Ola Lundqvist --- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD |

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi On Thu, Aug 02, 2007 at 07:41:49AM +0200, Marc Haber wrote: > On Thu, Aug 02, 2007 at 07:18:54AM +0200, Ola Lundqvist wrote: > > On Wed, Aug 01, 2007 at 11:49:19PM +0200, Marc Haber wrote: > > > I am afraid that your way of parsing the environment won't work. One > > > of the difficulties is th

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Thu, Aug 02, 2007 at 07:18:54AM +0200, Ola Lundqvist wrote: > On Wed, Aug 01, 2007 at 11:49:19PM +0200, Marc Haber wrote: > > I am afraid that your way of parsing the environment won't work. One > > of the difficulties is that one cannot easily distinguish between > > "unset variable" and "varia

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
On Wed, Aug 01, 2007 at 11:49:19PM +0200, Marc Haber wrote: > On Wed, Aug 01, 2007 at 09:11:18AM +0200, Ola Lundqvist wrote: > > On Tue, Jul 31, 2007 at 11:14:37PM +0200, Marc Haber wrote: > > > A different way to implement would mean having suffixes for the > > > variable name in config.d, either

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Wed, Aug 01, 2007 at 09:11:18AM +0200, Ola Lundqvist wrote: > On Tue, Jul 31, 2007 at 11:14:37PM +0200, Marc Haber wrote: > > A different way to implement would mean having suffixes for the > > variable name in config.d, either FOO_FROMHERE to replace FOO's value > > for the rest of the cron-apt

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi Marc On Wed, Aug 01, 2007 at 09:40:49PM +0200, Marc Haber wrote: > On Wed, Aug 01, 2007 at 09:35:55PM +0200, Ola Lundqvist wrote: > > On Wed, Aug 01, 2007 at 08:17:20PM +0200, Marc Haber wrote: > > > Quite general, but I do not see too much reasons to go for this > > > eval-IFSesque construct w

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Wed, Aug 01, 2007 at 09:35:55PM +0200, Ola Lundqvist wrote: > On Wed, Aug 01, 2007 at 08:17:20PM +0200, Marc Haber wrote: > > Quite general, but I do not see too much reasons to go for this > > eval-IFSesque construct when it is feasible to have a list of > > variables. Do you insist on this way

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi On Wed, Aug 01, 2007 at 08:17:20PM +0200, Marc Haber wrote: > On Wed, Aug 01, 2007 at 01:54:43PM +0200, Ola Lundqvist wrote: > > On Wed, Aug 01, 2007 at 12:05:29PM +0200, Marc Haber wrote: > > > On Wed, Aug 01, 2007 at 11:51:36AM +0200, Ola Lundqvist wrote: > > > > The drawback is that we will

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Wed, Aug 01, 2007 at 01:54:43PM +0200, Ola Lundqvist wrote: > On Wed, Aug 01, 2007 at 12:05:29PM +0200, Marc Haber wrote: > > On Wed, Aug 01, 2007 at 11:51:36AM +0200, Ola Lundqvist wrote: > > > The drawback is that we will have a separate proces for each action, but > > > maybe that is ok? > >

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi Marc On Wed, Aug 01, 2007 at 12:05:29PM +0200, Marc Haber wrote: > On Wed, Aug 01, 2007 at 11:51:36AM +0200, Ola Lundqvist wrote: > > The drawback is that we will have a separate proces for each action, but > > maybe that is ok? > > As long as the actions don't try communicating back to the ca

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Wed, Aug 01, 2007 at 11:51:36AM +0200, Ola Lundqvist wrote: > The drawback is that we will have a separate proces for each action, but > maybe that is ok? As long as the actions don't try communicating back to the caller, this could be fine. Communicating unfortunately includes "abort". > > Ye

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi Marc On Wed, Aug 01, 2007 at 11:03:42AM +0200, Marc Haber wrote: > On Wed, Aug 01, 2007 at 09:11:18AM +0200, Ola Lundqvist wrote: > > On Tue, Jul 31, 2007 at 11:14:37PM +0200, Marc Haber wrote: > > > Package: cron-apt > > > Version: 0.4.14 > > > Severity: wishlist > > > Tags: patch > > > > > >

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Marc Haber
On Wed, Aug 01, 2007 at 09:11:18AM +0200, Ola Lundqvist wrote: > On Tue, Jul 31, 2007 at 11:14:37PM +0200, Marc Haber wrote: > > Package: cron-apt > > Version: 0.4.14 > > Severity: wishlist > > Tags: patch > > > > The attached patch modifies config.d semantics so that variables set > > in config.d

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-08-01 Thread Ola Lundqvist
Hi Marc On Tue, Jul 31, 2007 at 11:14:37PM +0200, Marc Haber wrote: > Package: cron-apt > Version: 0.4.14 > Severity: wishlist > Tags: patch > > The attached patch modifies config.d semantics so that variables set > in config.d are only honored for the corresponding action.d item while > returnin

Bug#435459: cron-apt: patch to make config.d only apply for the file in question

2007-07-31 Thread Marc Haber
Package: cron-apt Version: 0.4.14 Severity: wishlist Tags: patch The attached patch modifies config.d semantics so that variables set in config.d are only honored for the corresponding action.d item while returning to the default read in from the config file for the next action.d item. This feels