After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571240 - Search for 'install' binary at run time
Search for 'install' binary at run time
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2009-02-10 22:49 UTC by Owen Taylor
Modified: 2009-04-07 16:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2009-02-10 22:49:59 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 :-)
Comment 1 Owen Taylor 2009-04-07 16:45:30 UTC
Change approved by fredp and committed. I added a perror() if the execute fails.