]> git.ipfire.org Git - pakfire.git/commitdiff
Fix shell on 64-bit hosts and clean environment before entering it.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Feb 2011 01:00:51 +0000 (02:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Feb 2011 01:00:51 +0000 (02:00 +0100)
pakfire/builder.py

index d0d7e56e1ca9a60927ea7b097b279497109366b2..8895c874d96e23ff861b433443123e3550af2b14 100644 (file)
@@ -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)