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

Re: OT: namespace pollution & prefixes



Le 23/05/2014 22:01, Felix Salfelder a écrit :
> On Fri, May 23, 2014 at 11:41:33AM +0200, Tobias Hansen wrote:
>> I would recommend to be careful not to pollute the /usr/bin namespace.
>> If a package really has to install many commands to /usr/bin in bulk,
>> consider prefixing them with the name of the project, e.g. seacas-fastq.
>> Especially if there are generic names such as decomp, algebra, numbers
>> involved.
> 
> good idea. thanks Tobias.
> 
> Nico: i have added & pushed the suggested prefixes, i didn't check
> whether some of them call each other yet.
> 

Another possibility is to put the actual commands in a lib directory
(e.g. /usr/lib/seacas-fastq/bin) and provide a wrapper in /usr/bin which
could look a bit like that:

#!/bin/sh
set -e
export PATH=/usr/lib/seacas-fastq/bin:$PATH
$@
exit 0

One advantage is that this should work even if the tools call one
another. Another is that users can also set their own path and drop the
prefix.

Kind regards, Thibaut.


-- 
* Dr Thibaut Paumard       | LESIA/CNRS - Table équatoriale (bât. 5)   *
* Tel: +33 1 45 07 78 60   | Observatoire de Paris - Section de Meudon *
* Fax: +33 1 45 07 79 17   | 5, Place Jules Janssen                    *
* thibaut.paumard@obspm.fr | 92195 MEUDON CEDEX (France)               *

Attachment: smime.p7s
Description: Signature cryptographique S/MIME


Reply to: