change unattended upgrade in histroy log to Chinese
This commit is contained in:
parent
87c4dfdd9f
commit
9a6c2a43ab
|
@ -569,7 +569,7 @@ class KylinBackupManager:
|
|||
else:
|
||||
logging.error("backup start failed")
|
||||
UpdateInfos = {}
|
||||
UpdateInfos.update({"packageName":""})
|
||||
UpdateInfos.update({"packageName":"kylin-unattended-upgrade"})
|
||||
UpdateInfos.update({"source":"kylin unattended upgrade"})
|
||||
UpdateInfos.update({"status":0})
|
||||
UpdateInfos.update({"errorCode":"backup start failed"})
|
||||
|
@ -586,7 +586,7 @@ class KylinBackupManager:
|
|||
else:
|
||||
logging.error("backup failed")
|
||||
UpdateInfos = {}
|
||||
UpdateInfos.update({"packageName":""})
|
||||
UpdateInfos.update({"packageName":"kylin-unattended-upgrade"})
|
||||
UpdateInfos.update({"source":"kylin unattended upgrade"})
|
||||
UpdateInfos.update({"status":0})
|
||||
UpdateInfos.update({"errorCode":"backup failed"})
|
||||
|
@ -1035,7 +1035,8 @@ class LogInstallProgress(apt.progress.base.InstallProgress):
|
|||
|
||||
if re.search("Installed",status):
|
||||
UpdateInfos = {}
|
||||
UpdateInfos.update({"packageName":str(pkg)})
|
||||
UpdateInfos.update({"packageName":"kylin-unattended-upgrade"})
|
||||
UpdateInfos.update({"appname":str(pkg)})
|
||||
UpdateInfos.update({"source":"kylin unattended upgrade"})
|
||||
UpdateInfos.update({"status":1})
|
||||
json_file = json.dumps(UpdateInfos.copy())
|
||||
|
@ -1044,7 +1045,8 @@ class LogInstallProgress(apt.progress.base.InstallProgress):
|
|||
|
||||
def error(self,pkg, errormsg):
|
||||
UpdateInfos = {}
|
||||
UpdateInfos.update({"packageName":str(pkg)})
|
||||
UpdateInfos.update({"packageName":"kylin-unattended-upgrade"})
|
||||
UpdateInfos.update({"appname":str(pkg)})
|
||||
UpdateInfos.update({"source":"kylin unattended upgrade"})
|
||||
UpdateInfos.update({"status":0})
|
||||
UpdateInfos.update({"errorCode":str(errormsg)})
|
||||
|
@ -2686,7 +2688,7 @@ def main(options, rootdir="/"):
|
|||
kylin_system_updater.SetConfigValue("SYSTEM","os_version",release)
|
||||
kylin_system_updater.SetConfigValue("SYSTEM","update_version",original_version)
|
||||
for rec in kylin_system_updater.group_rec:
|
||||
history.update({"appname":rec[0]+"(unattended upgrade)"})
|
||||
history.update({"appname":rec[0]+"(自动更新)"})
|
||||
history.update({"version":rec[1]})
|
||||
history.update({"description":""})
|
||||
history.update({"date":date})
|
||||
|
@ -2698,7 +2700,7 @@ def main(options, rootdir="/"):
|
|||
history.update({"changelog":rec[2]})
|
||||
kylin_system_updater.InsertUpgradeHistory(history)
|
||||
for rec in kylin_system_updater.single_rec:
|
||||
history.update({"appname":rec[0]+"(unattended upgrade)"})
|
||||
history.update({"appname":rec[0]+"(自动更新)"})
|
||||
history.update({"version":rec[1]})
|
||||
history.update({"description":""})
|
||||
history.update({"date":date})
|
||||
|
@ -2711,7 +2713,7 @@ def main(options, rootdir="/"):
|
|||
kylin_system_updater.InsertUpgradeHistory(history)
|
||||
elif not res.success:
|
||||
for rec in kylin_system_updater.group_rec:
|
||||
history.update({"appname":rec[0]+"(unattended upgrade"})
|
||||
history.update({"appname":rec[0]+"(自动更新)"})
|
||||
history.update({"version":rec[1]})
|
||||
history.update({"description":""})
|
||||
history.update({"date":date})
|
||||
|
@ -2723,7 +2725,7 @@ def main(options, rootdir="/"):
|
|||
history.update({"changelog":rec[2]})
|
||||
kylin_system_updater.InsertUpgradeHistory(history)
|
||||
for rec in kylin_system_updater.single_rec:
|
||||
history.update({"appname":rec[0]+"(unattended upgrade"})
|
||||
history.update({"appname":rec[0]+"(自动更新)"})
|
||||
history.update({"version":rec[1]})
|
||||
history.update({"description":""})
|
||||
history.update({"date":date})
|
||||
|
|
Loading…
Reference in New Issue