[ZCM] [ZC] 1311/ 4 Comment "script headers and execute permission"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Mon May 31 10:49:23 EDT 2004
Issue #1311 Update (Comment) "script headers and execute permission"
Status Pending, Zope/bug medium
To followup, visit:
http://zope.org/Collectors/Zope/1311
==============================================================
= Comment - Entry #4 by jbelmonte on May 31, 2004 10:49 am
> = Comment - Entry #3 by tim_one on May 24, 2004 4:14 pm
> stats.py is intended to be run directly from a shell, ditto simul.py and
> dangle.py, so it's appropriate that they have #! lines. Added them to
> setup.py's "scripts" list, also on HEAD.
When a script is installed into /usr/bin, there is a responsibility associated with that. Distributions such as Debian have policies requiring every command in /usr/bin to have a man page. So someone will have to bear the burden of maintaining a man page, either the ZODB team or the distribution packager, for each item you add to the scripts list. Also you have to worry about command name collisions, which I've pointed out elsewhere.
I don't think every .py file in the ZODB distribution that can be run directly from the shell should be installed into /usr/bin. The precedent seems to already exist: there are scripts in the various test directories which aren't installed into /usr/bin (e.g., ZEO/tests/speed.py).
I think one way to go about resolving all of this is to make sure things like simul.py, which would rarely get used by a normal user, are properly located in a test directory. Furthermore, the scripts in the test directories should not have headers or execute permission set, and should not be installed into /usr/bin. They are tests and experiments, and it's probably best to avoid having users mistake them for published and supported command line interfaces.
________________________________________
= Comment - Entry #3 by tim_one on May 24, 2004 4:14 pm
Added #! to zeoctl.py on HEAD.
stats.py is intended to be run directly from a shell, ditto simul.py and dangle.py, so it's appropriate that they have #! lines. Added them to setup.py's "scripts" list, also on HEAD.
Leaving remaining zdaemon and ZConfig files to someone else.
________________________________________
= Comment - Entry #2 by tim_one on May 24, 2004 3:41 pm
I removed from #! from zdaemon's __init__.py.
________________________________________
= Request - Entry #1 by tim_one on May 4, 2004 3:17 pm
>From John Belmonte, on the zodb-dev list; this involves more than one package:
"""
I'd like to see the following issues regarding script headers and execute permission cleaned up in the ZODB distribution.
Has a script header, but shouldn't:
/usr/lib/python2.3/site-packages/zdaemon/__init__.py
Executable, but missing script header:
/usr/bin/zeoctl.py
Have script header, but are not executable (for consistency with similar files, script header should probably be removed):
/usr/lib/python2.3/site-packages/ZEO/simul.py
/usr/lib/python2.3/site-packages/ZEO/stats.py
/usr/lib/python2.3/site-packages/ZODB/tests/dangle.py
/usr/lib/python2.3/site-packages/zdaemon/tests/nokill.py
/usr/lib/python2.3/site-packages/ZConfig/tests/runtests.py
"""
==============================================================
More information about the Zope-Collector-Monitor
mailing list