Revert "baseimager: add a couple of more installer FW variables"
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Wed, 26 Jun 2013 08:36:27 +0000 (11:36 +0300)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Wed, 26 Jun 2013 08:36:27 +0000 (11:36 +0300)
A better solution is invented.

This reverts commit be0a53342bec78025413dbbd0bf4de5d9c8b454f.

mic/imager/baseimager.py

index b8e414c..39bb6dd 100644 (file)
@@ -434,8 +434,6 @@ class BaseImageCreator(object):
 
         env = {}
         pnum = 0
-        root_pnum = ""
-        boot_pnum = ""
 
         for p in kickstart.get_partitions(self.ks):
             env.update(self._set_part_env(pnum, "SIZE", p.size))
@@ -446,24 +444,8 @@ class BaseImageCreator(object):
             env.update(self._set_part_env(pnum, "BOOTFLAG", p.active))
             env.update(self._set_part_env(pnum, "ALIGN", p.align))
             env.update(self._set_part_env(pnum, "TYPE_ID", p.part_type))
-
-            if p.mountpoint == "/":
-                assert root_pnum == ""
-                root_pnum = pnum
-            elif p.mountpoint == "/boot":
-                assert boot_pnum == ""
-                boot_pnum = pnum
-
             pnum += 1
 
-        # Root and boot parition numbers
-        assert root_pnum != ""
-        if boot_pnum == "":
-            # The boot parition is the root partition
-            boot_pnum = root_pnum
-        env[self.installerfw_prefix + "ROOT_PART_NUM"] = str(root_pnum)
-        env[self.installerfw_prefix + "BOOT_PART_NUM"] = str(boot_pnum)
-
         # Count of paritions
         env[self.installerfw_prefix + "PART_COUNT"] = str(pnum)