def _install_linux_partitions(self, msg, step, steps, weights):
   if self._cfg.is_test:
     for p in self._cfg.linux_partitions:
       if self._installation == 'cancelled': return step
       d = p[0]
       self._update_progressbar(msg + "\n - {0}".format(d), step, steps)
       w = weights[d]
       sleep(w)
       step += w
     return step
   else:
     rootmp = sltl.getMountPoint("/dev/{0}".format(self._cfg.main_partition))
     for p in self._cfg.linux_partitions:
       if self._installation == 'cancelled': return step
       d = p[0]
       self._update_progressbar(msg + "\n - {0}".format(d), step, steps)
       full_dev = "/dev/{0}".format(d)
       fs = p[1]
       mp = p[2]
       sltl.umountDevice(full_dev, deleteMountPoint = False)
       if fs != 'none':
         label = sltl.getFsLabel(d)
         if not label:
           label = os.path.basename(p[2])
           if len(label) > 12:
             label = None # for not having problems
         sltl.makeFs(d, fs, label = label, force = True)
       sltl.mountDevice(full_dev, mountPoint = "{root}/{mp}".format(root = rootmp, mp = mp))
       step += weights[d]
     return step
 def _install_main_partition(self):
   if self._cfg.is_test:
     sleep(1)
   else:
     d = "/dev/{0}".format(self._cfg.main_partition)
     sltl.umountDevice(d, deleteMountPoint = False)
     if self._cfg.main_format != 'none':
       label = sltl.getFsLabel(d)
       if not label:
         label = 'Salix'
       sltl.makeFs(self._cfg.main_partition, self._cfg.main_format, label = label, force = True)
     sltl.mountDevice(d, fsType = self._cfg.main_format)