Re: [Zope-dev] zopectl's -p options
Chris Withers wrote: > Hanno Schlichting wrote: >> On Mon, Jul 26, 2010 at 7:36 PM, Chris Withers >> wrote: >>> ...is currently useless, as far as I can see. >> I thought the -p option was an artifact of zdaemon, which zopectl just >> didn't support. I took it as a case of the lower level API's leaking >> through. > > I think it's an extremely useful feature ;-) > (likely broken by someone who didn't understand it, some time ago...) > >>> I think the attached patch fixes this, but I'm wondering: >>> >>> - are these are tests for this area >> I'm not aware of any. > > OK, I guess that makes life easier in some ways ;-) > >>> - why does self.program need to be a one element list? >> No idea. I find most of the zdaemon and Zope2 startup code rather obscure. > > Indeed. Well, unless anyone objects, I'd like to commit the patch I > proposed... OK, if there are no comments, I'll commit some time soon, likely on Monday. cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zopectl's -p options
Hanno Schlichting wrote: > On Mon, Jul 26, 2010 at 7:36 PM, Chris Withers wrote: >> ...is currently useless, as far as I can see. > > I thought the -p option was an artifact of zdaemon, which zopectl just > didn't support. I took it as a case of the lower level API's leaking > through. I think it's an extremely useful feature ;-) (likely broken by someone who didn't understand it, some time ago...) >> I think the attached patch fixes this, but I'm wondering: >> >> - are these are tests for this area > > I'm not aware of any. OK, I guess that makes life easier in some ways ;-) >> - why does self.program need to be a one element list? > > No idea. I find most of the zdaemon and Zope2 startup code rather obscure. Indeed. Well, unless anyone objects, I'd like to commit the patch I proposed... cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] zopectl's -p options
On Mon, Jul 26, 2010 at 7:36 PM, Chris Withers wrote: > ...is currently useless, as far as I can see. I thought the -p option was an artifact of zdaemon, which zopectl just didn't support. I took it as a case of the lower level API's leaking through. > I think the attached patch fixes this, but I'm wondering: > > - are these are tests for this area I'm not aware of any. > - why does self.program need to be a one element list? No idea. I find most of the zdaemon and Zope2 startup code rather obscure. Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] zopectl's -p options
...is currently useless, as far as I can see. This stops you specifying a different location for runzope, which is handy if you're doing buildout-based stuff that uses a deployment. I think the attached patch fixes this, but I'm wondering: - are these are tests for this area - why does self.program need to be a one element list? cheers, Chris === --- src/Zope2/Startup/zopectl.py(revision 115104) +++ src/Zope2/Startup/zopectl.py(working copy) @@ -114,11 +114,14 @@ positional_args_allowed = 1 -program = "zopectl" schemadir = os.path.dirname(Zope2.Startup.__file__) schemafile = "zopeschema.xml" uid = gid = None +# this indicates that no explict program has been provided. +# the command line option can set this. +program = None + # XXX Suppress using Zope's section to avoid using the # same logging for zdctl as for the Zope appserver. There still # needs to be a way to set a logfile for zdctl. @@ -169,7 +172,9 @@ config = self.configroot self.directory = config.instancehome self.clienthome = config.clienthome -if config.runner and config.runner.program: +if self.program: +self.program = [self.program] +elif config.runner and config.runner.program: self.program = config.runner.program else: self.program = [os.path.join(self.directory, "bin", "runzope")] -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )