zopectl: interactive mode broken (Windows only)

Bug #461446 reported by yuppie on 2009-10-26
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

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.

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.

-----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-----

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.

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-----

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.

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
ChrisW (chris-simplistix) wrote :

zopectl status fixed for Windows on Zope 2.12 branch in r105394

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  Edit
Everyone can see this information.

Other bug subscribers