Fix change partition Id.

master 2.2.27
Mike Hiretsky 13 years ago
parent 215bfb2050
commit 5b1fcee5e0

@ -970,6 +970,10 @@ class PartitionDistributive(Distributive):
elif self.isFormat:
self.formatPartition(self.partition,format=self.fileSystem,
label=self.rootLabel)
if self.systemId:
self.changeSystemID(self.partition,self.systemId,
self.partitionTable)
def changeSystemID(self,dev,systemid,parttable):
"""Change partition id, specified by systemid"""

@ -1726,7 +1726,15 @@ class cl_install(color_print, SignalInterrupt):
# update system id
osDiskDevices = self.clVars.Get('os_disk_dev')
updateIdDict = dict(map(lambda x:(x[0],x[2]),filter(lambda x:x[1]!=x[2],
def eqId(a,b):
isHex = re.compile("^[A-Fa-f0-9]+$").match
if b and (not a or not (isHex(a) and isHex(b))
or int(a,16)!=int(b,16)):
return True
else:
return False
updateIdDict = dict(map(lambda x:(x[0],x[2]),
filter(lambda x:eqId(x[1],x[2]),
zip(self.clVars.Get('os_disk_dev'),
self.clVars.Get('os_disk_id'),
self.clVars.Get('os_install_disk_id')))))

Loading…
Cancel
Save