zopectl: interactive mode broken (Windows only)

Bug #461446 reported by yuppie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Low
ChrisW

Bug Description

On trunk (and I guess also on the 2.12 branch) zopectl exits after most commands, e.g. after start, restart and stop. This is because do_windows always returns a true value. AFAICS only 'install' needs that return value. Here as a quick and dirty fix, but I'm sure there is a cleaner solution:

Index: src/Zope2/Startup/zopectl.py
===================================================================
--- src/Zope2/Startup/zopectl.py (revision 105303)
+++ src/Zope2/Startup/zopectl.py (working copy)
@@ -83,7 +83,7 @@
                 argv=argv,
                 )

- return err,InstanceService
+ return (command == 'install') and (err, InstanceService)

         return inner

Revision history for this message
ChrisW (chris-simplistix) wrote :

What do you mean by "exits"?
I'd expect:

$ zopectl start

...to return to the command line. What are you expecting?

Please do not apply the patch above.

Revision history for this message
yuppie (yuppie3) wrote :

By "interactive mode" I mean what you get if you just call zopectl without any command. In that case

zopectl> start

should return to the zopectl prompt and not to the command line.

Revision history for this message
Tres Seaver (tseaver) wrote : Re: [zope2-tracker] [Bug 461446] Re: zopectl: interactive mode broken (Windows only)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ChrisW wrote:
> What do you mean by "exits"?
> I'd expect:
>
> $ zopectl start
>
> ...to return to the command line. What are you expecting?
>
> Please do not apply the patch above.

The change which force exits from the "zopectl" shell is an unacceptable
breakage: in making it work on Windows, the change *breaks* everyday
usage on Unix.

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrnJK4ACgkQ+gerLs4ltQ4r0QCgwKbx+kgTQxOOz15GjhOEY00K
5MEAoNDnAwP7JrukN/BgCS4pl8lBD8Ad
=GBHN
-----END PGP SIGNATURE-----

Revision history for this message
yuppie (yuppie3) wrote :

@ Tres: ??? What are you talking about? How did the changes ChrisW made or my patch break things on Unix? AFAICS everything works fine on Unix.

Revision history for this message
Tres Seaver (tseaver) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> @ Tres: ??? What are you talking about? How did the changes ChrisW made
> or my patch break things on Unix? AFAICS everything works fine on Unix.

If this doesn't affect Unix systems, then it isn't really a regression,
as zopectl hasn't worked properly on Windows since Zope 2.2 (I think).

Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 <email address hidden>
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrnR9AACgkQ+gerLs4ltQ4MCgCgxKDbNKgEITTUp54DG35ZGk37
CgoAoMszUJXG/KAypFXRioNkwqk+8Vdg
=Ux1D
-----END PGP SIGNATURE-----

Revision history for this message
yuppie (yuppie3) wrote :

Well. I fixed some small Windows issues before the 2.12.0 release and (at least for me) most zopectl commands are working with Zope 2.12.0. So I think this is a regression compared to Zope 2.12.0.

Revision history for this message
ChrisW (chris-simplistix) wrote :

Fix on 2.12 branch in r105393:

C:\Zope\2.12.0i>bin\zopectl.exe
program: C:\zope\2.12.0i\bin\runzope
daemon manager not running
zopectl> install
Installing service Zope-598538646
Service installed
zopectl> start
Starting service Zope-598538646
zopectl> stop
Stopping service Zope-598538646
zopectl> remove
Removing service Zope-598538646
Service removed
zopectl> quit
daemon manager not running

The "daemon manager not running" annoys me, I wonder if that can be fixed too?

Changed in zope2:
assignee: nobody → ChrisW (chris-simplistix)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
ChrisW (chris-simplistix) wrote :

zopectl status fixed for Windows on Zope 2.12 branch in r105394

Revision history for this message
ChrisW (chris-simplistix) wrote :

Merged to Zope 2.12 trunk in r105396

Changed in zope2:
status: In Progress → Fix Committed
Changed in zope2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.