Quote:
Originally Posted by coldbeer
I am working on a project where I will need to have multiple versions of git installed.
|
This is almost always a bad strategy; I hope you know that already. The proprietary software world is full of Java products that demand a very specific JRE with very specific bugs that the vendor can't get their poor heads around fixing, so they just dump complexity on their customers instead. Don't be like that if you can avoid it. If an incompatible change in git-1.9 is holding you back, it will have to be tackled sooner or later, and sooner is better, because it will save you work implementing workrounds like this.
Having said that, the setup that you describe should just about work. The biggest issue I see with your current setup is that, unless you set MANPATH, you are getting the wrong versions of the manpages. If the exact version of git is so important to you, then getting the right documentation is a big deal.
Other stuff is also worryingly shared or sidelined, like the hooks and perl stuff. See below for a suggestion of how to deal with this.
Quote:
Originally Posted by coldbeer
Should I be including the /opt/git1_9_0/libexec & share in the path or does git know where these are from relative paths set by the configuration? Is there a way to be certain?
|
You have plenty of options.
- Delete /opt/git1_9_0/libexec, observe whether git-1.9 stops working, and then reinstall git 1.9.0. (This is why you should be making a proper package, not just doing 'make install')
- Uninstall git-1.8.4 and observe whether git-1.9 continues to work, then reinstall git-1.8.4
- Inspect the binaries with 'strings'. If you look carefully, you will see that the only occurrence of 'libexec' is in a single string, 'libexec/git-core'. This path fragment has no hardcoded prefix, or suffix, which suggests strongly that it works out the right prefix as required.
- The string 'libexec/git-core' also suggests a good way of grepping the place in the source code where you will be able to see exactly what it does and how it does it
*But* it would probably be much better to uninstall Slackware's git-1.8.4, and build your own 1.8.4 to install under /opt/git1_8_4, so that you have both /opt/git1_9_0 and /opt/git1_8_4. Then only the nondefault paths exist in each version. Thus there would be nothing shared and no possibility of cross-contamination.
[Why the mangled name, anyway? Call it /opt/git-1.9.0
]