Do not use full path for ldconfig
The ldconfig binary is not guaranteed to be in /sbin. Change to calling just "ldconfig" rather than using the full path. This removed the check that the ldconfig binary exists. However, it is a reasonable assumption that it will exist if its configuration file does. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
60b192e383
commit
bb4d2b72c1
1 changed files with 4 additions and 7 deletions
|
@ -621,13 +621,10 @@ int _alpm_ldconfig(alpm_handle_t *handle)
|
||||||
|
|
||||||
snprintf(line, PATH_MAX, "%setc/ld.so.conf", handle->root);
|
snprintf(line, PATH_MAX, "%setc/ld.so.conf", handle->root);
|
||||||
if(access(line, F_OK) == 0) {
|
if(access(line, F_OK) == 0) {
|
||||||
snprintf(line, PATH_MAX, "%ssbin/ldconfig", handle->root);
|
char arg0[32];
|
||||||
if(access(line, X_OK) == 0) {
|
char *argv[] = { arg0, NULL };
|
||||||
char arg0[32];
|
strcpy(arg0, "ldconfig");
|
||||||
char *argv[] = { arg0, NULL };
|
return _alpm_run_chroot(handle, "ldconfig", argv);
|
||||||
strcpy(arg0, "ldconfig");
|
|
||||||
return _alpm_run_chroot(handle, "/sbin/ldconfig", argv);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue