Another raspbian fix.
authorCarl Hetherington <cth@carlh.net>
Mon, 27 Apr 2015 22:57:53 +0000 (23:57 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 27 Apr 2015 22:57:53 +0000 (23:57 +0100)
cdist

diff --git a/cdist b/cdist
index 0c61827ff379b0c4d3f5e6690b70bebd1b1a1463..0f19d0c819bc6155df5afe1e1e1ac0c8edac2c14 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -412,7 +412,10 @@ class LinuxTarget(Target):
         self.version = version
         self.bits = bits
         # e.g. ubuntu-14.04-64
-        self.chroot = '%s-%s-%d' % (self.distro, self.version, self.bits)
+        if self.version is not None and self.bits is not None:
+            self.chroot = '%s-%s-%d' % (self.distro, self.version, self.bits)
+        else:
+            self.chroot = self.distro
         # e.g. /home/carl/Environments/ubuntu-14.04-64
         self.chroot_prefix = '%s/%s' % (config.get('linux_chroot_prefix'), self.chroot)
 
@@ -522,7 +525,7 @@ def target_factory(s, debug, work):
             sys.exit(1)
         target = LinuxTarget(p[0], p[1], int(p[2]), work)
     elif s == 'raspbian':
-        target = LinuxTarget(s, '', 32, work)
+        target = LinuxTarget(s, None, None, work)
     elif s.startswith('osx-'):
         target = OSXSingleTarget(int(s.split('-')[1]), work)
     elif s == 'osx':