Merge branch 'backend_manual' into 'backend_uu'

Backend manual

See merge request kylin-desktop/update-manager-group/kylin-system-updater!440
This commit is contained in:
wangsong 2022-06-16 03:30:05 +00:00
commit da74781b0c
8 changed files with 110 additions and 78 deletions

View File

@ -18,8 +18,8 @@ import datetime
import threading import threading
from email import message from email import message
from binascii import a2b_hex
from datetime import datetime from datetime import datetime
from binascii import a2b_hex
from Crypto.PublicKey import RSA from Crypto.PublicKey import RSA
from urllib import parse, request from urllib import parse, request
from PyQt5.QtCore import QSettings from PyQt5.QtCore import QSettings

View File

@ -3,11 +3,12 @@
"""enums - Enumerates for apt daemon dbus messages""" """enums - Enumerates for apt daemon dbus messages"""
__all__ = ( __all__ = (
"ERROR_UPDATE_DEFAULT_FAILED",
"ERROR_UPDATE_SOURCE_FAILED","ERROR_NETWORK_FAILED","ERROR_NOT_GROUPS_CONFIG","ERROR_SOFTWARE_INDEX_RROKEN", "ERROR_UPDATE_SOURCE_FAILED","ERROR_NETWORK_FAILED","ERROR_NOT_GROUPS_CONFIG","ERROR_SOFTWARE_INDEX_RROKEN",
"ERROR_NOT_INIT_PACKAGESINFIO","ERROR_READ_IMPORTANTLIST_FAILED","ERROR_RESOLVER_FAILED","ERROR_NOT_UPGRADE_PACKAGES", "ERROR_NOT_INIT_PACKAGESINFIO","ERROR_READ_IMPORTANTLIST_FAILED","ERROR_RESOLVER_FAILED","ERROR_NOT_UPGRADE_PACKAGES",
"ERROR_REMOVE_ESSENTIAL_PACKAGES","ERROR_NOT_DISK_SPACE", "ERROR_REMOVE_ESSENTIAL_PACKAGES","ERROR_NOT_DISK_SPACE",
"ERROR_UPDATE_KEY_SIGNATURES","ERROR_UPDATE_NET_AUTHENTICATION","ERROR_UPDATE_NOTREAD_SOURCES", "ERROR_UPDATE_KEY_SIGNATURES","ERROR_UPDATE_NET_AUTHENTICATION","ERROR_UPDATE_NOTREAD_SOURCES","PRIORITY_UPGRADE_SUCCCESSED",
"get_error_description_from_enum", "get_error_string_from_enum", "get_source_name_from_enum") "get_error_description_from_enum", "get_error_string_from_enum", "get_source_name_from_enum")
@ -16,15 +17,19 @@ gettext.bindtextdomain('kylin-system-updater', '/usr/share/locale')
gettext.textdomain('kylin-system-updater') gettext.textdomain('kylin-system-updater')
_ = gettext.gettext _ = gettext.gettext
PRIORITY_UPGRADE_SUCCCESSED = "priority-upgrade-successed"
#更新阶段 #更新阶段
ERROR_UPDATE_DEFAULT_FAILED = "error-update-default-failed"
ERROR_UPDATE_KEY_SIGNATURES = "The following signatures" ERROR_UPDATE_KEY_SIGNATURES = "The following signatures"
ERROR_UPDATE_NET_AUTHENTICATION ="does the network require authentication?" ERROR_UPDATE_NET_AUTHENTICATION ="does the network require authentication?"
ERROR_UPDATE_NOTREAD_SOURCES = "The list of sources could not be read" ERROR_UPDATE_NOTREAD_SOURCES = "The list of sources could not be read"
#自己的
ERROR_UPDATE_SOURCE_FAILED = "error-update-source-failed" ERROR_UPDATE_SOURCE_FAILED = "error-update-source-failed"
ERROR_NETWORK_FAILED = "error-network-failed" ERROR_NETWORK_FAILED = "error-network-failed"
ERROR_NOT_GROUPS_CONFIG = "error-not-groups-config" ERROR_NOT_GROUPS_CONFIG = "error-not-groups-config"
#自己的
ERROR_SOFTWARE_INDEX_RROKEN = "error-software-index-broken" ERROR_SOFTWARE_INDEX_RROKEN = "error-software-index-broken"
ERROR_NOT_INIT_PACKAGESINFIO = "error-not-init-packagesinfo" ERROR_NOT_INIT_PACKAGESINFIO = "error-not-init-packagesinfo"
ERROR_READ_IMPORTANTLIST_FAILED = "error-read-importantlist-failed" ERROR_READ_IMPORTANTLIST_FAILED = "error-read-importantlist-failed"
@ -34,40 +39,48 @@ ERROR_REMOVE_ESSENTIAL_PACKAGES = "error-remove-essential-packages"
ERROR_NOT_DISK_SPACE = "error-not-disk-space" ERROR_NOT_DISK_SPACE = "error-not-disk-space"
_STRINGS_ERROR = { _STRINGS_ERROR = {
ERROR_UPDATE_SOURCE_FAILED: _("Unable to access the source management server"), PRIORITY_UPGRADE_SUCCCESSED: _("Update Manager upgrade is complete, please restart the control panel before performing the system update"),
ERROR_NETWORK_FAILED: _("Please check your network connection and retry."),
ERROR_NOT_GROUPS_CONFIG: _("Unable to get group configuration package, please contact administrator to solve"), #update
ERROR_SOFTWARE_INDEX_RROKEN: _("Software index is broken"), ERROR_UPDATE_DEFAULT_FAILED: _("Check for update exceptions,please check your network connection and retry."),
ERROR_NOT_INIT_PACKAGESINFIO: _("Could not initialize the package information"), ERROR_UPDATE_SOURCE_FAILED: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_READ_IMPORTANTLIST_FAILED: _("read important list failed"), ERROR_NETWORK_FAILED: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_NOT_GROUPS_CONFIG: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_UPDATE_KEY_SIGNATURES: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_READ_IMPORTANTLIST_FAILED: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_SOFTWARE_INDEX_RROKEN: ERROR_UPDATE_DEFAULT_FAILED,
ERROR_NOT_INIT_PACKAGESINFIO: ERROR_UPDATE_DEFAULT_FAILED,
#install
ERROR_RESOLVER_FAILED: _("Could not calculate the upgrade"), ERROR_RESOLVER_FAILED: _("Could not calculate the upgrade"),
ERROR_NOT_UPGRADE_PACKAGES: _("There is an exception in the update package."), ERROR_NOT_UPGRADE_PACKAGES: _("There is an exception in the update package."),
ERROR_REMOVE_ESSENTIAL_PACKAGES: _("There is an exception in the update package."), ERROR_REMOVE_ESSENTIAL_PACKAGES: _("There is an exception in the update package."),
ERROR_NOT_DISK_SPACE: _("Disk space is insufficient, please clean the disk and then upgrade")} ERROR_NOT_DISK_SPACE: _("Disk space is insufficient, please clean the disk and then upgrade")}
_DESCS_ERROR = { _DESCS_ERROR = {
ERROR_UPDATE_SOURCE_FAILED: _("Check your source management server config"), #update
ERROR_UPDATE_SOURCE_FAILED: _("Unable to access the source management server"),
ERROR_NETWORK_FAILED: _("Please check your network connection and retry."), ERROR_NETWORK_FAILED: _("Please check your network connection and retry."),
ERROR_NOT_GROUPS_CONFIG: _("groups JSON ConfigPkgs install failed"), ERROR_UPDATE_KEY_SIGNATURES: _("Check your source public key signature"),
ERROR_UPDATE_NOTREAD_SOURCES: _("Please check your source list and retry."),
ERROR_UPDATE_NET_AUTHENTICATION: _("Check if your network requires authentication?"),
ERROR_NOT_GROUPS_CONFIG: _("Unable to get group configuration package, please contact administrator to solve."),
ERROR_NOT_INIT_PACKAGESINFIO: _("An unresolvable problem occurred while " ERROR_NOT_INIT_PACKAGESINFIO: _("An unresolvable problem occurred while "
"initializing the package information.\n\n" "initializing the package information.\n\n"
"Please report this bug against the 'kylin-system-updater' " "Please report this bug against the 'kylin-system-updater' "
"package and include the following error " "package and include the following error "
"message:\n"), "message:\n"),
ERROR_SOFTWARE_INDEX_RROKEN: _("It is impossible to install or remove any software. " ERROR_SOFTWARE_INDEX_RROKEN: _("Software index is broken") + _("It is impossible to install or remove any software. "
"Please use the package manager \"Synaptic\" or run " "Please use the package manager \"Synaptic\" or run "
"\"sudo apt-get install -f\" in a terminal to fix " "\"sudo apt-get install -f\" in a terminal to fix "
"this issue at first."), "this issue at first."),
ERROR_READ_IMPORTANTLIST_FAILED: _("tttttttttttttttttt"), ERROR_READ_IMPORTANTLIST_FAILED: _("read important list failed"),
#install
ERROR_RESOLVER_FAILED: _("nothing"), ERROR_RESOLVER_FAILED: _("nothing"),
ERROR_NOT_UPGRADE_PACKAGES: _("This update cannot detect the upgradeable package."), ERROR_NOT_UPGRADE_PACKAGES: _("This update cannot detect the upgradeable package."),
ERROR_REMOVE_ESSENTIAL_PACKAGES: _("You request the removal of a system-essential package."), ERROR_REMOVE_ESSENTIAL_PACKAGES: _("You request the removal of a system-essential package."),
ERROR_NOT_DISK_SPACE: _("test"), ERROR_NOT_DISK_SPACE: _("test")
ERROR_UPDATE_KEY_SIGNATURES: _("Check your source public key signature"),
ERROR_UPDATE_NET_AUTHENTICATION: _("Check if your network requires authentication?"),
ERROR_UPDATE_NOTREAD_SOURCES: _("Please check your source list and retry.")
} }
#UPGRADE MONITOR STATUS #UPGRADE MONITOR STATUS

View File

@ -306,7 +306,7 @@ class UpdateManager():
def _check_self_upgrade(self,cache): def _check_self_upgrade(self,cache):
need_upgrade = False need_upgrade = False
self_upgrade = []
with open(UpdateList.IMPORTANT_LIST_PATH, 'r') as f: with open(UpdateList.IMPORTANT_LIST_PATH, 'r') as f:
data = f.read() data = f.read()
important_list = data.split() important_list = data.split()
@ -315,16 +315,19 @@ class UpdateManager():
if pkg_name in cache: if pkg_name in cache:
self_pkg = cache[pkg_name] self_pkg = cache[pkg_name]
if self_pkg.is_installed and self_pkg.is_upgradable: if self_pkg.is_installed and self_pkg.is_upgradable:
logging.info("Check: Updater(%s) start upgrading From %s to %s...",pkg_name,\ logging.info("Check: (%s) will upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version) self_pkg.installed.source_version,self_pkg.candidate.source_version)
if pkg_name in important_list: if pkg_name in important_list:
try: try:
logging.info("Check: (%s) start upgrading From %s to %s...",pkg_name,\
self_pkg.installed.source_version,self_pkg.candidate.source_version)
self_pkg.mark_install() self_pkg.mark_install()
self_upgrade.append(pkg_name)
need_upgrade = True need_upgrade = True
except SystemError: except SystemError:
logging.error("Check: mark %s to upgrade Failed...",pkg_name) logging.error("Check: mark %s to upgrade Failed...",pkg_name)
else: else:
logging.info("Check: (%s:%s) No need to upgrade...",pkg_name,self_pkg.installed.source_version) logging.info("Check: (%s:%s) No need to upgrade and duo to not pust...",pkg_name,self_pkg.installed.source_version)
else: else:
logging.info("Check: (%s:%s) No need to upgrade...",pkg_name,self_pkg.installed.source_version) logging.info("Check: (%s:%s) No need to upgrade...",pkg_name,self_pkg.installed.source_version)
else: else:
@ -338,20 +341,28 @@ class UpdateManager():
self.dbusController.UpdateDetectStatusChanged(95,_("Group configuration being updated")) self.dbusController.UpdateDetectStatusChanged(95,_("Group configuration being updated"))
logging.info("Check: groups JSON ConfigPkgs(%s) start upgrading From %s to %s...",self.GROUPS_PKG_NAME,\ logging.info("Check: groups JSON ConfigPkgs(%s) start upgrading From %s to %s...",self.GROUPS_PKG_NAME,\
pkg_json.installed.source_version,pkg_json.candidate.source_version) pkg_json.installed.source_version,pkg_json.candidate.source_version)
try:
pkg_json.mark_install() pkg_json.mark_install()
self_upgrade.append(self.GROUPS_PKG_NAME)
need_upgrade = True need_upgrade = True
except SystemError:
logging.error("Check: mark %s to upgrade Failed...",pkg_name)
else: else:
logging.info("Check: ConfigPkgs(%s:%s) No need to upgrade...",self.GROUPS_PKG_NAME,pkg_json.installed.source_version) logging.info("Check: ConfigPkgs(%s:%s) No need to upgrade...",self.GROUPS_PKG_NAME,pkg_json.installed.source_version)
else: else:
self.dbusController.UpdateDetectStatusChanged(95,_("Group configuration being updated")) self.dbusController.UpdateDetectStatusChanged(95,_("Group configuration being updated"))
logging.info("Check: groups JSON ConfigPkgs(%s) start new installing...",self.GROUPS_PKG_NAME) logging.info("Check: groups JSON ConfigPkgs(%s) start new installing...",self.GROUPS_PKG_NAME)
try:
pkg_json.mark_install() pkg_json.mark_install()
self_upgrade.append(self.GROUPS_PKG_NAME)
need_upgrade = True need_upgrade = True
except SystemError:
logging.error("Check: mark %s to upgrade Failed...",pkg_name)
else: else:
raise UpdateBaseError(ERROR_NOT_GROUPS_CONFIG) raise UpdateBaseError(ERROR_NOT_GROUPS_CONFIG)
if need_upgrade == True: if need_upgrade == True:
self.start_install(InstallBackend.MODE_INSTALL_SINGLE,True) self.start_install(InstallBackend.MODE_INSTALL_SINGLE,True,upgrade_content=self_upgrade)
raise UpdateProgressExit() raise UpdateProgressExit()
def _check_system_broken(self,cache): def _check_system_broken(self,cache):

View File

@ -66,7 +66,8 @@ class UpdateManagerDbusController(dbus.service.Object):
self.parent.start_update_backend() self.parent.start_update_backend()
def _update_important_error(self,retval): def _update_important_error(self,retval):
self.DistUpdateDetectFinished(False,[''],get_error_string_from_enum(ERROR_UPDATE_SOURCE_FAILED),str(retval)) logging.error(str(retval))
self.DistUpdateDetectFinished(False,[''],get_error_string_from_enum(ERROR_UPDATE_SOURCE_FAILED))
#更新important.list的本次升级的列表 #更新important.list的本次升级的列表
def on_update_important_list(self): def on_update_important_list(self):

View File

@ -295,8 +295,7 @@ class InstallBackendAptdaemon(InstallBackend):
return return
self.aptd_base.progress = progress self.aptd_base.progress = progress
self._dist_status_changed(action,self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs,\ self._dist_status_changed(action,self.now_upgrade.upgrade_content,self.aptd_base.progress,self.aptd_base.status,self.aptd_base.details)
self.aptd_base.progress,self.aptd_base.status,self.aptd_base.details)
#同步状态回调 #同步状态回调
@ -309,7 +308,7 @@ class InstallBackendAptdaemon(InstallBackend):
if self.aptd_base.status == None: if self.aptd_base.status == None:
return return
self._dist_status_changed(action,self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs,\ self._dist_status_changed(action,self.now_upgrade.upgrade_content,\
self.aptd_base.progress,self.aptd_base.status,self.aptd_base.details) self.aptd_base.progress,self.aptd_base.status,self.aptd_base.details)
#分发进度状态和细节信息 #分发进度状态和细节信息

View File

@ -64,8 +64,12 @@ class NowUpgradeMeta:
return groups_list,pkg_list return groups_list,pkg_list
def make_upgrade_content(self,content): def make_upgrade_content(self,content):
if self.parent.action_mode != self.parent.MODE_INSTALL_SINGLE:
self.upgrade_groups,self.single_pkgs = self._make_groups_list(self.parent.upgrade_data,self.parent.action_mode,content) self.upgrade_groups,self.single_pkgs = self._make_groups_list(self.parent.upgrade_data,self.parent.action_mode,content)
self.upgrade_content = self.upgrade_groups + self.single_pkgs self.upgrade_content = self.upgrade_groups + self.single_pkgs
else:
self.single_pkgs = content
self.upgrade_content = self.upgrade_groups + self.single_pkgs
class AptdBaseInformation: class AptdBaseInformation:
@ -141,7 +145,6 @@ class InstallBackend():
try: try:
#安装升级包 首先必须调用ACTION_CHECK_RESOLVER 计算依赖解决方便 标记cache 进行升级 #安装升级包 首先必须调用ACTION_CHECK_RESOLVER 计算依赖解决方便 标记cache 进行升级
if self.action == self.ACTION_INSTALL or self.action == self.ACTION_DOWNLOADONLY: if self.action == self.ACTION_INSTALL or self.action == self.ACTION_DOWNLOADONLY:
if self.action_mode != self.MODE_INSTALL_SINGLE:
#拿到升级列表 #拿到升级列表
self.now_upgrade.make_upgrade_content(partial_upgrade_list) self.now_upgrade.make_upgrade_content(partial_upgrade_list)
@ -157,8 +160,8 @@ class InstallBackend():
if len(pkgs_install) == 0 and len(pkgs_upgrade) == 0 and len(pkgs_remove) == 0: if len(pkgs_install) == 0 and len(pkgs_upgrade) == 0 and len(pkgs_remove) == 0:
raise UpdateBaseError(ERROR_NOT_UPGRADE_PACKAGES) raise UpdateBaseError(ERROR_NOT_UPGRADE_PACKAGES)
if self.action_mode == self.MODE_INSTALL_SINGLE: # if self.action_mode == self.MODE_INSTALL_SINGLE:
logging.warning("MODE_INSTALL_SINGLE install:%s , upgrade:%s remove:%s",str(pkgs_install),str(pkgs_upgrade),str(pkgs_remove)) # logging.warning("MODE_INSTALL_SINGLE install:%s , upgrade:%s remove:%s",str(pkgs_install),str(pkgs_upgrade),str(pkgs_remove))
self.window_main.update_essential.check(pkgs_remove) self.window_main.update_essential.check(pkgs_remove)
@ -495,6 +498,37 @@ class InstallBackend():
if error_code == ERROR_NOT_DISK_SPACE: if error_code == ERROR_NOT_DISK_SPACE:
self.window_main.dbusController.InstallDetectStatus(False,error_code) self.window_main.dbusController.InstallDetectStatus(False,error_code)
def _self_upgrade_finished(self,success,error_string='',error_desc=''):
if success:
if self.window_main.configs.getWithDefault("SystemStatus", "priority_upgrade_restart", False) == True:
error_string = get_error_string_from_enum(PRIORITY_UPGRADE_SUCCCESSED)
if self.window_main.APTD_PKG_NAME in self.now_upgrade.upgrade_content:
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,'')
self.window_main.dbusController.make_aptdeamon_restart()
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.FRONTEND_PKG_NAME in self.now_upgrade.upgrade_content:
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,'')
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.BACKEND_PKG_NAME in self.now_upgrade.upgrade_content:
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,'')
#升级本身完成后 退出 有systemd 来进行重启服务
self.window_main.dbusController.Quit(None)
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.GROUPS_PKG_NAME in self.now_upgrade.upgrade_content:
#只有安装配置文件包 才会走到此处
self.window_main.update_essential.update()
self.window_main.start_available()
else:
#只有安装配置文件包 才会走到此处
self.window_main.update_essential.update()
self.window_main.start_available()
else:
default_string = get_error_string_from_enum(ERROR_UPDATE_DEFAULT_FAILED)
self.window_main.dbusController.DistUpdateDetectFinished(success,[],default_string,error_string +' '+error_desc)
#调用aptdeamon结束之后处理的地方 不管是出错还是正常都在此处理 #调用aptdeamon结束之后处理的地方 不管是出错还是正常都在此处理
def _action_done(self, action, is_cancelled,success, error_string,error_desc,error_code=''): def _action_done(self, action, is_cancelled,success, error_string,error_desc,error_code=''):
#后端的状态 到空闲状态 #后端的状态 到空闲状态
@ -505,41 +539,8 @@ class InstallBackend():
self._release_install_lock() self._release_install_lock()
self._send_error_code(error_code) self._send_error_code(error_code)
#单包安装模式 单独处理 目前 更新配置包和升级本身使用
if self.action_mode == self.MODE_INSTALL_SINGLE: if self.action_mode == self.MODE_INSTALL_SINGLE:
if success: self._self_upgrade_finished()
if self.window_main.APTD_PKG_NAME in self.cache and self.cache[self.window_main.APTD_PKG_NAME] in self.cache.get_changes():
error_string = _("Update Manager upgrade is complete, please restart the control panel before performing the system update")
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,error_desc)
self.window_main.dbusController.make_aptdeamon_restart()
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.FRONTEND_PKG_NAME in self.cache and self.cache[self.window_main.FRONTEND_PKG_NAME] in self.cache.get_changes():
error_string = _("Update Manager upgrade is complete, please restart the control panel before performing the system update")
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,error_desc)
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.BACKEND_PKG_NAME in self.cache and self.cache[self.window_main.BACKEND_PKG_NAME] in self.cache.get_changes():
error_string = _("Update Manager upgrade is complete, please restart the control panel before performing the system update")
self.window_main.dbusController.DistUpdateDetectFinished(False,[self.window_main.BACKEND_PKG_NAME],error_string,error_desc)
#升级本身完成后 退出 有systemd 来进行重启服务
self.window_main.dbusController.Quit(None)
#当单包升级的时候 升级本身时,让程序退出,再重新启动
if self.window_main.GROUPS_PKG_NAME in self.cache and self.cache[self.window_main.GROUPS_PKG_NAME] in self.cache.get_changes():
#只有安装配置文件包 才会走到此处
self.window_main.update_essential.update()
self.window_main.start_available()
return
else:
#当更新过程中安装配置包时 失败时发送错误信号
# 防止错误结果太长导致出现控制面板显示太多 目前最多20字符
if len(error_string + error_desc) > 20:
self.window_main.dbusController.DistUpdateDetectFinished(success,[],error_string,error_desc)
else:
self.window_main.dbusController.DistUpdateDetectFinished(success,[],error_string,error_desc)
return
else: else:
if self.now_upgrade.version_upgrade == True and self.now_upgrade.need_retry == True and success == False: if self.now_upgrade.version_upgrade == True and self.now_upgrade.need_retry == True and success == False:
#增加重试次数的限制 #增加重试次数的限制
@ -651,12 +652,14 @@ class InstallBackend():
#开始生成列表 #开始生成列表
self.window_main.start_available() self.window_main.start_available()
else: else:
self.window_main.dbusController.DistUpdateDetectFinished(success,[],error_string,error_desc) self.window_main.dbusController.DistUpdateDetectFinished(success,[''],\
get_error_string_from_enum(ERROR_UPDATE_DEFAULT_FAILED),error_string+' '+error_desc)
self.window_main.sqlite3_server.insert_into_display("check_time",get_east_8_time()) self.window_main.sqlite3_server.insert_into_display("check_time",get_east_8_time())
elif action == self.ACTION_UPDATE and self.action_mode == self.MODE_UPDATE_CACHE: elif action == self.ACTION_UPDATE and self.action_mode == self.MODE_UPDATE_CACHE:
self.window_main.dbusController.DistUpdateDetectFinished(success,[],error_string,error_desc) self.window_main.dbusController.DistUpdateDetectFinished(success,[''],\
get_error_string_from_enum(ERROR_UPDATE_DEFAULT_FAILED),error_string+' '+error_desc)
elif action == self.ACTION_FIX_BROKEN: elif action == self.ACTION_FIX_BROKEN:
self.window_main.dbusController.FixBrokenStatusChanged(True,success,100,'',error_string,error_desc) self.window_main.dbusController.FixBrokenStatusChanged(True,success,100,'',error_string,error_desc)
logging.warning("fix broken packages is complete...") logging.warning("fix broken packages is complete...")
@ -665,7 +668,8 @@ class InstallBackend():
logging.info("Fix broken packages is complete to success...") logging.info("Fix broken packages is complete to success...")
self.window_main.start_available() self.window_main.start_available()
else: else:
self.window_main.dbusController.DistUpdateDetectFinished(success,[],error_string,error_desc) self.window_main.dbusController.DistUpdateDetectFinished(success,[],\
get_error_string_from_enum(ERROR_UPDATE_DEFAULT_FAILED),error_string+' '+error_desc)
logging.error("fix broken packages is complete to failed...") logging.error("fix broken packages is complete to failed...")
elif action == self.ACTION_FIX_INCOMPLETE: elif action == self.ACTION_FIX_INCOMPLETE:

View File

@ -2,6 +2,7 @@
abnormal_reboot = False abnormal_reboot = False
close_source_filter = False close_source_filter = False
upload_upgrade_log = False upload_upgrade_log = False
priority_upgrade_restart = True
[ConfigPkgStatus] [ConfigPkgStatus]
check_resover_remove = False check_resover_remove = False

View File

@ -616,8 +616,8 @@ msgid "Checking package manager"
msgstr "正在检查软件包管理器" msgstr "正在检查软件包管理器"
#: ../DistUpgrade/DistUpgradeController.py:1593 #: ../DistUpgrade/DistUpgradeController.py:1593
msgid "Unable to get group configuration package, please contact administrator to solve" msgid "Unable to get group configuration package, please contact administrator to solve."
msgstr "无法获取组配置软件包,请联系管理员解决" msgstr "无法获取组配置软件包,请联系管理员解决"
#: ../DistUpgrade/DistUpgradeController.py:1594 #: ../DistUpgrade/DistUpgradeController.py:1594
msgid "" msgid ""
@ -2599,7 +2599,7 @@ msgid "Installation failed, about to shut down"
msgstr "安装失败,即将关机" msgstr "安装失败,即将关机"
msgid "groups JSON ConfigPkgs install failed" msgid "groups JSON ConfigPkgs install failed"
msgstr "无法安装分组配置文件,请稍后再试" msgstr "无法安装分组配置文件"
msgid "Installtion timeout to exit Due to inactivity" msgid "Installtion timeout to exit Due to inactivity"
msgstr "安装超时退出由于" msgstr "安装超时退出由于"
@ -2622,6 +2622,9 @@ msgstr "依赖关系不满足"
msgid "Disk space is insufficient, please clean the disk and then upgrade" msgid "Disk space is insufficient, please clean the disk and then upgrade"
msgstr "磁盘空间不足,请清理磁盘后进行升级更新" msgstr "磁盘空间不足,请清理磁盘后进行升级更新"
msgid "Check for update exceptions,please check your network connection and retry."
msgstr "检查更新异常,请检查您的网络连接后再试。"
msgid "Please check your network connection and retry." msgid "Please check your network connection and retry."
msgstr "请检查您的网络连接后再试。" msgstr "请检查您的网络连接后再试。"