Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: What provides

  1. #11
    Join Date
    Sep 2012

    Default Re: What provides

    Quote Originally Posted by fusion809 View Post
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR/curl/curl-7.53.1/lib/.libs:$DIR/glew-1.10.0/lib"
    If LD_LIBRARY_PATH is empty this assignment makes it look in current directory at the time you run this script. This opens up rather wide door for hijacking your program. You should always check whether variable is set before doing such assignments. Something like
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:}$DIR/curl/curl-7.53.1/lib/.libs:$DIR/glew-1.10.0/lib"

  2. #12

    Default AW: What provides

    Good point, but wouldn't it be better to put the additional paths in front of the "standard" ones?

    This is a serious question, for setting $PATH it certainly matters.


    I use a self compiled version of gpg (2.1.x) but can not switch to it completely (signing and signature checking of rpms still needs 2.0.x).

    My solution looks like this, only for my normal user, root does not have /opt/gpg/bin/, so zypper/rpm are happy and my ~/.rpmmrc sets %__gpg explicitly to /usr/bin/gpg.

    So a "which gpg" gives me "/opt/gpg/bin/gpg", but if I change PATH to this

    export PATH=/home/axel/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/sbin:/opt/gpg/bin
    a "which gpg" gives "/usr/bin/gpg" (as expected).

    I would presume this

    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:}$DIR/curl/curl-7.53.1/lib/.libs:$DIR/glew-1.10.0/lib"
    would only prefer the modified libraries if "$LD_LIBRARY_PATH" is empty.


Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts