Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-01-20 21:56:57 +1000
committerAllan McRae <allan@archlinux.org>2013-01-28 23:38:46 +1000
commit89ecf8cabebfd13e50473fba7fb98f65a52b02d8 (patch)
treebb640857b2eb0d89ac3af16fcd4c02868e2acf22 /lib/libalpm/util.c
parente3d8197d67336b6e59ee184762271cf64431aca6 (diff)
Make path to ldconfig configurable
The FHS (2.3) says having ldconfig in /sbin is optional and it is usually located in /usr/sbin. So /sbin/ldconfig should not be hard coded in pacman. Instead, provide a configure option --with-ldconfig that defaults to the current path. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index c88326f2..7d9ee635 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -621,12 +621,12 @@ int _alpm_ldconfig(alpm_handle_t *handle)
snprintf(line, PATH_MAX, "%setc/ld.so.conf", handle->root);
if(access(line, F_OK) == 0) {
- snprintf(line, PATH_MAX, "%ssbin/ldconfig", handle->root);
+ snprintf(line, PATH_MAX, "%s%s", handle->root, LDCONFIG);
if(access(line, X_OK) == 0) {
char arg0[32];
char *argv[] = { arg0, NULL };
strcpy(arg0, "ldconfig");
- return _alpm_run_chroot(handle, "/sbin/ldconfig", argv);
+ return _alpm_run_chroot(handle, LDCONFIG, argv);
}
}