summaryrefslogtreecommitdiffstats
path: root/test/pacman/pmtest.py
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-01-20 12:56:57 +0100
committerAllan McRae <allan@archlinux.org>2013-01-28 14:38:46 +0100
commit89ecf8cabebfd13e50473fba7fb98f65a52b02d8 (patch)
treebb640857b2eb0d89ac3af16fcd4c02868e2acf22 /test/pacman/pmtest.py
parente3d8197d67336b6e59ee184762271cf64431aca6 (diff)
downloadpacman-89ecf8cabebfd13e50473fba7fb98f65a52b02d8.tar.gz
pacman-89ecf8cabebfd13e50473fba7fb98f65a52b02d8.tar.xz
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 'test/pacman/pmtest.py')
-rw-r--r--test/pacman/pmtest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py
index af5d342b..1d198f04 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py
@@ -120,11 +120,12 @@ class pmtest(object):
logdir = os.path.join(self.root, os.path.dirname(util.LOGFILE))
etcdir = os.path.join(self.root, os.path.dirname(util.PACCONF))
bindir = os.path.join(self.root, "bin")
- sbindir = os.path.join(self.root, "sbin")
+ ldconfig = os.path.basename(pacman["ldconfig"])
+ ldconfigdir = os.path.join(self.root, os.path.dirname(pacman["ldconfig"][1:]))
shell = pacman["scriptlet-shell"][1:]
shelldir = os.path.join(self.root, os.path.dirname(shell))
sys_dirs = [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir, bindir,
- sbindir, shelldir]
+ ldconfigdir, shelldir]
for sys_dir in sys_dirs:
if not os.path.isdir(sys_dir):
vprint("\t%s" % sys_dir[len(self.root)+1:])
@@ -134,7 +135,7 @@ class pmtest(object):
if shell != "bin/sh":
shutil.copy("/bin/sh", os.path.join(self.root, shell))
shutil.copy(os.path.join(util.SELFPATH, "ldconfig.stub"),
- os.path.join(sbindir, "ldconfig"))
+ os.path.join(ldconfigdir, ldconfig))
ld_so_conf = open(os.path.join(etcdir, "ld.so.conf"), "w")
ld_so_conf.close()