Re: Directory structure and version conflicts

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

 



On 22.5.2013 19:44, Fabricio Cannini wrote:
I could not find how to change the PATH when enabling a collection. I'd
guess it's the same way as with LD_LIBRARY_PATH [0] but I'm not sure .

You install scl-utils and meta-package (in my case we are using ruby 1.9.3 on el6 - it is named ruby193).

And then:
# ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
# scl enable ruby193 "ruby --version"
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

"scl enable foo" will (beside few other things) the script
/opt/rh/ruby193/enable
which is very short and contains:
export PATH=/opt/rh/ruby193/root/usr/bin:$PATH
export LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/lib64:$LD_LIBRARY_PATH
export MANPATH=/opt/rh/ruby193/root/usr/share/man:$MANPATH

This allows you to install ruby193 packages into something which looks like chroot in /opt/rh/ruby193/root, but it actually is not chroot. It is just preferred path. And allows you to use libraries from base operating system.

> What would be a great advantage of Software Collections against
> environment-modules ?

SCL is in its core environment modules (EM). The difference is that EM modify you current shell, but SCL start new shell. SCL allows you to easy convert your spec files to SCL spec files (man spec2scl) with just very few changes. For example when you install ruby193-build and scl-utils-build, then %{_bindir} is evaluated to:
/opt/rh/ruby193/root/usr/bin

Mirek
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list




[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux