From a7596ccfebcd29324bfb99ee92981c41fbedd0dc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 21 Feb 2011 02:00:51 +0100 Subject: [PATCH] Fix shell on 64-bit hosts and clean environment before entering it. --- pakfire/builder.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pakfire/builder.py b/pakfire/builder.py index d0d7e56e1..8895c874d 100644 --- a/pakfire/builder.py +++ b/pakfire/builder.py @@ -511,20 +511,19 @@ class Builder(object): self.pkg.dist(self) def shell(self, args=[]): - # XXX need to add linux32 or linux64 to the command line # XXX need to set CFLAGS here - command = "chroot %s /usr/bin/chroot-shell %s" % \ + command = "/usr/sbin/chroot %s /usr/bin/chroot-shell %s" % \ (self.chrootPath(), " ".join(args)) - for key, val in self.environ.items(): - command = "%s=\"%s\" " % (key, val) + command - # Add personality if we require one if self.pakfire.distro.personality: - command = "%s %s" % (self.pakfire.disto.personality, command) + command = "%s %s" % (self.pakfire.distro.personality, command) + + for key, val in self.environ.items(): + command = "%s=\"%s\" " % (key, val) + command # Empty the environment - #command = "env -i - %s" % command + command = "env -i - %s" % command logging.debug("Shell command: %s" % command) -- 2.47.3