[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: policy should frown on programs in PATH with language extentions (ie, .pl)



On Thu, Apr 17, 2003 at 11:25:51PM -0400, Joey Hess wrote:
> I suggest something like this be added to section 11.4:
> 
>     When scripts are installed into /usr/bin or other directories in
>     the PATH, the program name should not include an extension such as
>     .sh or .pl that denotes the scripting language currently used to
>     implement it. There may be rare exceptions to this rule, and this
>     does not apply to scripts in /usr/share or to example scripts in
>     /usr/share/doc/*/examples.

I would second it, but I do not like the wording:

>     When scripts are installed into /usr/bin or other directories in
>     the PATH

why not:

  into a directory in the system PATH,

>  There may be rare exceptions to this rule, and this
>     does not apply to scripts in /usr/share or to example scripts in
>     /usr/share/doc/*/examples.

What kind of exception do you have in mind ? Remember, we are only
against "an extension such as .sh or .pl that denotes the scripting
language currently used to implement it". Random extension for other
purpose are still OK (e.g. versionning, alternatives, backup, etc...).
(python2.1,mkfs.ext2, xdvi.real,updatedb.notslocate, pstree.x11)

>     does not apply to scripts in /usr/share or to example scripts in
>     /usr/share/doc/*/examples.

I think this is covered by the first sentence.

I thing the two situations when the language extension is useful
is 1) when the script is sourced rather than exec'ed and 2) if
it is a config file.

If the script is not in the PATH and never to be used by the user, 
the language extension serve no purpose but do no harm. 


I would personnally be fine with only:

    When scripts are installed into into a directory in the system PATH,
    the script name should not include an extension such as .sh or .pl
    that denotes the scripting language currently used to implement it.

but I can easily be persuaded otherwise.

Cheers,
-- 
Bill. <ballombe@debian.org>



Reply to: