Dne 19.1.2013 19:40, Andrew Ford napsal(a):
I am giving a talk about Software Collections to my colleagues at
work
on Monday and I remembered the confusion I first had with the scl
command. I was expecting the "scl enable" command to set up symbolic
links or something - i.e. make some long-lasting change to the
envionment in the way that perlbrew does, i.e. set up or enable a
particular version of software. The word "enable" here is actually a
misnomer, and scl is more akin to the coreutils "modified command
invocation" commands (chroot, env, nice, nohup, etc.) - or even ssh.
The other thing I trip over is that all arguments up to the last are
collection names.
I might be mistaken, but the "enable" is the name of the scriptlet you
are executing. It is totally up to you, how you will name it. Or at
least that was original idea. The "enable" is just convention.
I know that the scl command is pretty much established now, but a
nicer syntax would be:
scl-env --with perl-5.18 perl script argument ...
i.e. provide the collection name as an option and let the rest of the
command line be passed to the command to be invoked with the modified
environment. If you want to run a command with multiple collections
enabled then give the --with option multiple times, or provide the
names in a single argument separated with spaces or commas, e.g.
scl-env --with perl-5.18 --with mysql-5.1 perl script argument ...
or
scl-env --with perl-5.18,mysql-5.1 perl script argument ...
Just my two cents' worth.
However, not sure if naming the scriptlet "--with" is good idea ;) But
the best part is that it works :D (I renamed existing scriplet, not sure
if it works in every place of the build chain though).
Vít