From: Michael Tremer Date: Mon, 21 Feb 2011 01:00:51 +0000 (+0100) Subject: Fix shell on 64-bit hosts and clean environment before entering it. X-Git-Tag: 0.9.3~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7596ccfebcd29324bfb99ee92981c41fbedd0dc;p=pakfire.git Fix shell on 64-bit hosts and clean environment before entering it. --- 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)