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
a "which gpg" gives "/usr/bin/gpg" (as expected).
I would presume this
would only prefer the modified libraries if "$LD_LIBRARY_PATH" is empty.