if kwargs.has_key("env"):
env.update(kwargs.pop("env"))
+ # Update personality it none was set
+ if not personality:
+ personality = self.pakfire.distro.personality
+
self._mountall()
if not kwargs.has_key("chrootPath"):
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)
+
# Empty the environment
#command = "env -i - %s" % command
return info
+ @property
+ def personality(self):
+ """
+ Return the personality of the target system.
+
+ If host and target system are of the same architecture, we return
+ None to skip the setting of the personality in the build chroot.
+ """
+
+ if self.arch == self.host_arch:
+ return None
+
+ arch2personality = {
+ "x86_64" : "linux64",
+ "i686" : "linux32",
+ "i586" : "linux32",
+ "i486" : "linux32",
+ }
+
+ return arch2personality[self.arch]
+