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



Bill Allombert wrote:
> 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,

I don't see much benefit either way. Reads the same to me.

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

I had in mind the i2e program, which is shipped upstream as i2e, a
graphical binary, and i2e.sh, a command-line tool. Granted this is
annoying, and I've already asked the maintainer to ask upstream to find
a better name than i2e.sh, but it probably shouldn't be forced to change
by policy. Also, I like leaving room for weird stuff in general.

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

Sure, that could be removed.

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

I agree. I don't think it's good design to put a program name into a
config file. sysvinit's use of .sh scripts is fine of course.

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

Yep.

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

I would also be happy with this, and I'll file a bug with a proposal now
that it's had at least some discussion.

-- 
see shy jo

Attachment: pgpVIF6DH1pKm.pgp
Description: PGP signature


Reply to: