GNOME Bugzilla – Bug 571240
Search for 'install' binary at run time
Last modified: 2009-04-07 16:45:30 UTC
We've had multiple people getting obscure build failures for gnome-shell because on Arch linux, install is in /bin/install not /usr/bin/install. (Don't know why, not really my concern.) The fix in bug 364465 was to add a preprocessor define, but that's not really a solution in my opinion. I could make our build-setup script try to detect the location and set the preprocessor define, but I'd much rather that jhbuild just go it right. Searching $PATH seems reasonable, along the line of: - return execv (args[0], args); + return execvp (args[0], args); (Obviously changing args[0]). If that was considered an unacceptable performance hit, you could stat /usr/bin/install first, before going the general route, but just using $PATH seems most expected. For bonus points, check the return value of exec and print an error message :-)
Change approved by fredp and committed. I added a perror() if the execute fails.