1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

pactest: add shell to fake root environment

Adds a shell to the fake root set up for pactests, which was not needed
previously due to a bug (debian #582847) in fakechroot.

Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org>
This commit is contained in:
Jonathan Conder 2010-08-19 00:07:18 +12:00 committed by Dan McGee
parent 9fbf5d9336
commit 90c45f7bbe

View File

@ -110,10 +110,13 @@ class pmtest:
tmpdir = os.path.join(self.root, TMPDIR)
logdir = os.path.join(self.root, os.path.dirname(LOGFILE))
etcdir = os.path.join(self.root, os.path.dirname(PACCONF))
for dir in [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir]:
bindir = os.path.join(self.root, "bin")
for dir in [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir, bindir]:
if not os.path.isdir(dir):
vprint("\t%s" % dir[len(self.root)+1:])
os.makedirs(dir, 0755)
# Only the dynamically linked binary is needed for fakechroot
shutil.copy("/bin/sh", bindir)
# Configuration file
vprint(" Creating configuration file")