|
|
|
@ -21,7 +21,7 @@ import re
|
|
|
|
|
import operator
|
|
|
|
|
from operator import itemgetter
|
|
|
|
|
from calculate.lib.datavars import (Variable, VariableError, ReadonlyVariable,
|
|
|
|
|
CommonVariableError)
|
|
|
|
|
CommonVariableError, BuildAlreadyInstalledError)
|
|
|
|
|
from calculate.lib.utils.common import (getSupportArch, getTupleVersion,
|
|
|
|
|
cmpVersion, cmp)
|
|
|
|
|
from calculate.lib.utils.files import listDirectory, pathJoin
|
|
|
|
@ -39,6 +39,7 @@ from functools import reduce, cmp_to_key
|
|
|
|
|
setLocalTranslate('cl_install3', sys.modules[__name__])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DistroRepository(Linux):
|
|
|
|
|
contentCache = {}
|
|
|
|
|
|
|
|
|
@ -632,10 +633,13 @@ class VariableClImageNewOnly(Variable):
|
|
|
|
|
except Exception as e:
|
|
|
|
|
raise VariableError(_("Wrong image file"))
|
|
|
|
|
if imageData.get('os_linux_build', '') <= \
|
|
|
|
|
self.Get('os_linux_build') or \
|
|
|
|
|
imageData.get('os_linux_build',
|
|
|
|
|
'') <= self.installedBuild():
|
|
|
|
|
self.Get('os_linux_build'): #or \
|
|
|
|
|
# imageData.get('os_linux_build',
|
|
|
|
|
# '') <= self.installedBuild():
|
|
|
|
|
raise CommonVariableError(_("The image for update not found"))
|
|
|
|
|
if imageData.get('os_linux_build', '') <= self.installedBuild():
|
|
|
|
|
raise BuildAlreadyInstalledError(_("Build already installed"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableClInstallPathFrom(ReadonlyVariable):
|
|
|
|
|