Merge branch 'dev' into 'master'

Dev

See merge request kylin-desktop/update-manager-group/kylin-system-updater!1
This commit is contained in:
wangsong 2021-10-26 06:30:37 +00:00
commit 98b6d41661
13 changed files with 263 additions and 457 deletions

1
.gitignore vendored
View File

@ -5,7 +5,6 @@ __pycache__
.vscode
.pybuild
build
debian/files
debian/.debhelper
debian/kylin-system-updater
debian/kylin-system-updater.debhelper.log

View File

@ -221,47 +221,35 @@ class UpdateList():
#过滤没有推送的配置文件
if not group_name in group_list:
continue
upgrade_pkgs_list = data['upgrade_list']
# hold_pkgs_list = data['hold_list']
#这个安装升级列表中包含当前系统的cache中没有的包 需要过滤
# remove_pkgs_list = data['remove_list']
#检查包是否在cache中 以及是否已经安装 没有安装的话才添加到列表
new_install_pkgs_list = self._check_pkg_in_cache(cache,data['install_list'])
#此在读important 是需要新安装的标记为install组中的重合去除
for pkg in new_install_pkgs_list:
if cache[pkg].marked_install:
new_install_pkgs_list.remove(pkg)
#进行交集 升级列表
upgrade_intersection_pkgs = list(set(pkgs_upgrade) & set(upgrade_pkgs_list))
#判断当前是否可升级或者新装的包
if len(new_install_pkgs_list) == 0 and len(upgrade_intersection_pkgs) == 0:
continue
#在总升级列表中移除这些包
for pkg in upgrade_intersection_pkgs:
pkgs_upgrade.remove(pkg)
#3、生成升级的包列表JSON
upgrade_pkgs_json = self._make_pkg_info_json(cache,upgrade_intersection_pkgs)
#2、生成安装的软件列表
install_pkgs_json = self._make_pkg_info_json(cache,new_install_pkgs_list)
#输出JSON配置文件
self._make_group_output_json(data,data_yaml,upgrade_pkgs_json,install_pkgs_json)
#添加到字典维护的升级列表
self.local_upgrade_data.upgrade_groups.append(group_name)
self.local_upgrade_data.upgrade_groups_pkgs.update({group_name:{"pkgs_upgrade":upgrade_intersection_pkgs,"pkgs_install":new_install_pkgs_list}})
logging.info("group(%s) upgrade:%d install:%d",group_name,len(upgrade_intersection_pkgs),len(new_install_pkgs_list))
else:
pass
@ -327,7 +315,7 @@ class UpdateList():
try:
for pkg in pkg_list:
zh_name = ''
groups_base_info = {}
base_info = {}
output_json = {}
output_config_name = OUTPUT_CONFIG_PATH + pkg + '.json'
@ -344,16 +332,16 @@ class UpdateList():
description_str = getattr(pkg_cache.candidate, "description", '')
#4、添加一些基础信息
groups_base_info.update({"package":pkg})
base_info.update({"package":pkg})
groups_base_info.update({"cur_version":getattr(pkg_cache.installed, "version", '')})
groups_base_info.update({"new_version":getattr(pkg_cache.candidate, "version", '')})
groups_base_info.update({"name":{"zh_CN":zh_name,"en_US":en_name}})
groups_base_info.update({"description":{"zh_CN":description_str,"en_US":description_str}})
groups_base_info.update({"icon":''})
base_info.update({"cur_version":getattr(pkg_cache.installed, "version", '')})
base_info.update({"new_version":getattr(pkg_cache.candidate, "version", '')})
base_info.update({"name":{"zh_CN":zh_name,"en_US":en_name}})
base_info.update({"description":{"zh_CN":description_str,"en_US":description_str}})
base_info.update({"icon":''})
#5、添加升级的内容
output_json.update(groups_base_info)
output_json.update(base_info)
if pkg_cache.is_installed:
output_json.update({"upgrade_list":pkgs_json})
output_json.update({"install_list":{}})
@ -390,16 +378,15 @@ class UpdateList():
#源过滤
# fu = filter.UpdateListFilterCache()
# allowed_origin_upgrade_pkgs = fu.check_in_allowed_origin(pkgs_upgrade)
# pkgs_upgrade = fu.check_in_allowed_origin(pkgs_upgrade)
success,group_important_list,self.local_upgrade_data.single_pkgs,header,desc = self._read_important_list(cache,pkgs_upgrade)
#important_list 为空时此次不需要升级
if success == True and not group_important_list and not self.local_upgrade_data.single_pkgs:
#不需要升级 全部的软件都是新的
header = _("There are no updates to install.")
desc = _('important_list is Empty')
return True,header,desc
header = _("The software on this computer is up to date.")
desc = ""
return success,header,desc
elif success == False:
return success,header,desc
@ -416,7 +403,6 @@ class UpdateList():
if self.local_upgrade_data.upgrade_groups or self.local_upgrade_data.single_pkgs:
return True,header,desc
else:
#不需要升级 全部的软件都是新的
header = _("The software on this computer is up to date.")
desc = ''
return True,header,desc

View File

@ -108,7 +108,8 @@ class UpdateManager():
self.dbusController.UpdateDetectFinished(_success,upgrade_list,header,desc)
#保持清空cache的标记
self.cache._initDepCache()
if self.cache.get_changes():
self.cache.clear()
#检查安装完成之后需要重启吗
self.is_reboot_required()
@ -144,9 +145,12 @@ class UpdateManager():
#FIXME: 错误处理未做 报告到控制面板
except Exception as e:
header = _("Preparing the upgrade failed")
desc = _("groups JSON ConfigPkgs install failed")
logging.warning("groups JSON ConfigPkgs(%s) install failed...",GROUPS_PKG_NAME)
logging.error(e)
_success = False
return _success,header,desc
#FIXME:
#3、 判断目录是JSON配置文件夹是否缺失 缺失后进行修复 卸载重新安装步骤
@ -187,7 +191,7 @@ class UpdateManager():
header = _("Could not initialize the package information")
desc = _("An unresolvable problem occurred while "
"initializing the package information.\n\n"
"Please report this bug against the 'update-manager' "
"Please report this bug against the 'kylin-system-updater' "
"package and include the following error "
"message:\n") + str(e)
_success = False

View File

@ -18,6 +18,23 @@ UPDATER_DBUS_INTERFACE = 'com.kylin.systemupgrade.interface'
UPDATER_DBUS_PATH = '/com/kylin/systemupgrade'
UPDATER_DBUS_SERVICE = 'com.kylin.systemupgrade'
#颜色设置
COLORLOG_SUFFIX = "\033[0m"
NO_PRE = "\033[0m"
RED_PRE = "\033[31;1m"
GREEN_PRE = "\033[32;1m"
YELLOW_PRE = "\033[33;1m"
BULE_PRE = "\033[34;1m"
BACK_BLACK_PER = "\033[40;1m"
BACK_RED_PER = "\033[41;1m"
BACK_GREEN_PER = "\033[42;1m"
BACK_YELLOW_PER = "\033[43;1m"
BACK_BLUE_PER = "\033[44;1m"
BACK_WHITE_YELLOW_PRE = "\033[1;31;43m"
COLORLOG_PREFIX = BACK_YELLOW_PER
#dbus 建立
class UpdateManagerDbusController(dbus.service.Object):
""" this is a helper to provide the UpdateManagerIFace """
@ -56,11 +73,8 @@ class UpdateManagerDbusController(dbus.service.Object):
return False,header,desc
if retval == False:
#FIXME: 需要处理返回结果 转化成中文
#获取软件推送失败
#请检查推送服务器
header = _("Get software push failure")
desc = _("Please check the push servers")
header = _("Failed to get update software push, please try to update again later")
desc = _("Connection exception with push server")
logging.warning(header + desc)
return retval,header,desc
else:
@ -213,30 +227,30 @@ class UpdateManagerDbusController(dbus.service.Object):
#更新进度信息 0~100 进度信息 101为非预期的信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='is')
def UpdateDetectStatusChanged(self,progress,status):
logging.info("emit UpdateDetectStatusChanged progress = %d , status = %s",progress,status)
logging.info(COLORLOG_PREFIX+"emit"+COLORLOG_SUFFIX+" UpdateDetectStatusChanged progress = %d , status = %s",progress,status)
#更新完成的信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='basss')
def UpdateDetectFinished(self, success, upgrade_group,error_string='',error_desc='',):
logging.info("emit UpdateDetectFinished success = %r , upgrade_group = %a, error_string = %s , error_desc = %s ",\
logging.info(COLORLOG_PREFIX + "emit"+ COLORLOG_SUFFIX + " UpdateDetectFinished success = %r , upgrade_group = %a, error_string = %s , error_desc = %s ",\
success,upgrade_group,error_string,error_desc)
#升级的进度信息 0~100 进度信息 101为非预期的信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='asiss')
def UpdateDloadAndInstStaChanged(self,groups_list,progress,status,current_details):
logging.info("emit UpdateDloadAndInstStaChanged upgrade groups_list = %s progress = %d , status = %s ,\
current_details = %s",groups_list,progress,status,current_details)
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDloadAndInstStaChanged upgrade groups_list = %s progress = %d , status = %s ,\
current_details = %s\033[0m",groups_list,progress,status,current_details)
#升级完成的信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='basss')
def UpdateDownloadFinished(self, success, upgrade_group,error_string='',error_desc='',):
logging.info("emit UpdateDownloadFinished success = %r , upgrade_group = %a, error_string = %s , error_desc = %s ",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDownloadFinished success = %r , upgrade_group = %a, error_string = %s , error_desc = %s ",\
success,upgrade_group, error_string,error_desc)
#发送下载包信息
@dbus.service.signal(UPDATER_DBUS_INTERFACE, signature='iiiii')
def UpdateDownloadInfo(self, current_items, total_items, currenty_bytes, total_bytes, current_cps):
logging.info("emit UpdateDownloadInfo current_items = %d, total_items = %d, currenty_bytes = %s, total_bytes = %s, current_cps = %s/s",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDownloadInfo current_items = %d, total_items = %d, currenty_bytes = %s, total_bytes = %s, current_cps = %s/s",\
current_items, total_items, \
humanize_size(currenty_bytes), humanize_size(total_bytes),\
humanize_size(current_cps))
@ -244,23 +258,23 @@ class UpdateManagerDbusController(dbus.service.Object):
#查询解决依赖 信号
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='bbasasasss')
def UpdateDependResloveStatus(self, resolver_status, remove_status,remove_pkgs,pkg_raw_description,delete_desc,error_string='',error_desc='',):
logging.info("emit UpdateDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,delete_desc = %a,error_string = %s , error_desc = %s ",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,delete_desc = %s,error_string = %s , error_desc = %s ",\
resolver_status,remove_status,remove_pkgs,pkg_raw_description,delete_desc,error_string,error_desc)
#查询dist-upgrade解决依赖
@dbus.service.signal(UPDATER_DBUS_INTERFACE,signature='bbasasss')
def DistupgradeDependResloveStatus(self, resolver_status, remove_status,remove_pkgs,pkg_raw_description,error_string='',error_desc='',):
logging.info("emit DistupgradeDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,error_string = %s , error_desc = %s ",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" DistupgradeDependResloveStatus:resolver_status = %r , resolver_status = %r , remove_pkgs = %a,pkg_raw_description = %a ,error_string = %s , error_desc = %s ",\
resolver_status,remove_status,remove_pkgs,pkg_raw_description,error_string,error_desc)
# 信号是否可取消
@dbus.service.signal(UPDATER_DBUS_INTERFACE, signature='b')
def Cancelable(self, Cancelable):
logging.info("emit Cancelable: %r",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" Cancelable: %r",\
Cancelable)
# 插入数据库完成后发送
@dbus.service.signal(UPDATER_DBUS_INTERFACE, signature='ss')
def update_sqlite_single(self, appname, date):
logging.info("emit update_sqlite_single: [ %s ]: date: %s .",\
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" update_sqlite_single: [ %s ]: date: %s .",\
appname, date)

View File

@ -1 +1 @@
VERSION = '1.0.4kord'
VERSION = '1.1.7kord'

View File

@ -68,8 +68,8 @@ class InstallBackendAptdaemon(InstallBackend):
self._action_done(self.ACTION_INSTALL,
authorized=True, success=False,
#FIXME: 安装超时退出
error_string=_('Installtion timeout to Exit'),
error_desc=_("Due to inactivity"))
error_string=_("Could not install the upgrades"),
error_desc=_("Installtion timeout to exit Due to inactivity") + self.details)
self.window_main.dbusController.Quit(None)
return False

View File

@ -97,7 +97,8 @@ class InstallBackend():
else:
# 使用全盘升级 全盘使用dist-upgrade
try:
self.cache._initDepCache()
if self.cache.get_changes():
self.cache.clear()
_success = self.cache._depcache.upgrade(True)
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache)
except Exception as e:
@ -237,7 +238,8 @@ class InstallBackend():
#actiongroup 可以加速计算依赖关系 计算花费的时间将大幅度缩减
with self.cache.actiongroup():
self.cache._initDepCache()
if self.cache.get_changes():
self.cache.clear()
Fix = apt_pkg.ProblemResolver(self.cache._depcache)
all_delete_pkgs = []
@ -268,7 +270,7 @@ class InstallBackend():
header = _("Could not calculate the upgrade")
desc = _("An unresolvable problem occurred while "
"calculating the upgrade.\n\n"
"Please report this bug against the 'update-manager' "
"Please report this bug against the 'kylin-system-updater' "
"package and include the following error "
"message:\n") + str(e)
logging.error(header + desc)
@ -282,8 +284,8 @@ class InstallBackend():
self.window_main.is_upgrading = False
unLockedEnableShutdown()
#完成后清空cache
self.cache._initDepCache()
if self.cache.get_changes():
self.cache.clear()
if success:
#当组列表为空时 表示现在的单独进行安装某些包或卸载,不发信号到控制面板
if self.now_upgrade.upgrade_mode != MODE_UPGRADE_SINGLE:
@ -303,7 +305,7 @@ class InstallBackend():
# 信息插入数据库 and 发送信号
if error_string != '' or error_desc != '':
logging.error(error_string + error_desc)
logging.info(error_string + error_desc)
self.window_main.sqlite3_server.insert_info(self.now_upgrade.upgrade_mode,self.now_upgrade.single_pkgs,self.now_upgrade.upgrade_groups,success,error_string,error_desc)
self.window_main.dbusController.UpdateDownloadFinished(success,upgrade_content,error_string,error_desc)

View File

@ -1,43 +0,0 @@
#!/usr/bin/python3
from __future__ import print_function
from SystemUpdater.UpdateManager import UpdateManager
from gettext import gettext as _
# import
import logging
from optparse import OptionParser
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
#定义日志的格式
FORMAT = '%(asctime)-15s %(levelname)s:%(message)s'
FORMAT_DEBUG = '%(asctime)-15s %(levelname)s(%(filename)s:%(lineno)d):%(message)s'
if __name__ == "__main__":
# Begin parsing of options
parser = OptionParser()
parser.add_option ("--no-update", action="store_true",
dest="no_update", default=False,
help=_("Do not check for updates when starting"))
parser.add_option ("", "--debug", action="store_true", default=False,
help=_("Show debug messages"))
(options, args) = parser.parse_args()
if options.debug:
logging.basicConfig(format=FORMAT,level=logging.INFO)
else:
logging.basicConfig(format=FORMAT,level=logging.INFO)
logging.info('kylin-update-manager starting ...')
bus_loop = DBusGMainLoop(set_as_default=True)
app = UpdateManager(options)
# app.start_update()
loop = GLib.MainLoop()
loop.run()

2
debian/files vendored
View File

@ -1,2 +0,0 @@
kylin-system-updater_1.0.4kord_all.deb misc optional
kylin-system-updater_1.0.4kord_arm64.buildinfo misc optional

1
debian/postinst vendored
View File

@ -10,4 +10,3 @@ fi
cp -r /usr/share/kylin-system-updater/kylin-system-updater.db /var/cache/kylin-system-updater/
systemctl enable kylin-system-updater
systemctl start kylin-system-updater

View File

@ -10,9 +10,14 @@ import signal
import os
import sys
import fcntl
import gettext
from SystemUpdater.Core.LogManager import get_logfile as logfile
gettext.bindtextdomain('kylin-system-updater', '/usr/share/locale')
gettext.textdomain('kylin-system-updater')
_ = gettext.gettext
#定义日志的格式
FORMAT = '%(asctime)-15s %(levelname)s:%(message)s'
@ -43,6 +48,10 @@ if __name__ == "__main__":
(options, args) = parser.parse_args()
if os.getuid() != 0:
print(_("You need to be root to run this application"))
sys.exit(1)
# set debconf to NON_INTERACTIVE
os.environ["DEBIAN_FRONTEND"] = "noninteractive"
os.environ["TERM"] = "xterm"
@ -53,16 +62,10 @@ if __name__ == "__main__":
signal.signal(signal.SIGHUP, signal.SIG_IGN)
signal.signal(signal.SIGINT,signal_handler_term)
if options.debug:
logging.basicConfig(format=FORMAT,level=logging.DEBUG)
# if options.debug:
# logging.basicConfig(format=FORMAT,level=logging.DEBUG)
# else:
# logging.basicConfig(format=FORMAT,level=logging.INFO,filename = logfile(),filemode = 'a')
if os.getuid() != 0:
print(_("You need to be root to run this application"))
sys.exit(1)
else:
logging.basicConfig(format=FORMAT,level=logging.INFO,filename = logfile(),filemode = 'a')
logging.info('kylin-system-updater starting ...')

View File

@ -1,172 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#: ../SystemUpdater/UpdateManager.py:75
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-26 15:21+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../SystemUpdater/backend/InstallBackendAptdaemon.py:42
msgid "Checking for updates…"
msgstr ""
#: ../SystemUpdater/backend/InstallBackendAptdaemon.py:64
msgid "Installing updates…"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:58
msgid "Not enough free disk space"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:59
#, python-format
msgid ""
"The upgrade needs a total of %s free space on disk '%s'. Please free at "
"least an additional %s of disk space on '%s'. %s"
msgstr ""
#. specific ways to resolve lack of free space
#: ../SystemUpdater/UpdateManager.py:64
msgid ""
"Remove temporary packages of former installations using 'sudo apt clean'."
msgstr ""
#: ../SystemUpdater/UpdateManager.py:66
msgid ""
"You can remove old kernels using 'sudo apt autoremove', and you could also "
"set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce the size of "
"your initramfs."
msgstr ""
#: ../SystemUpdater/UpdateManager.py:71
msgid ""
"Empty your trash and remove temporary packages of former installations using "
"'sudo apt clean'."
msgstr ""
#: ../SystemUpdater/UpdateManager.py:74
msgid "Reboot to clean up files in /tmp."
msgstr ""
#: ../SystemUpdater/UpdateManager.py:173
msgid "Software index is broken"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:174
msgid ""
"It is impossible to install or remove any software. Please use the package "
"manager \"Synaptic\" or run \"sudo apt-get install -f\" in a terminal to fix "
"this issue at first."
msgstr ""
#: ../SystemUpdater/UpdateManager.py:182
msgid "Could not initialize the package information"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:183
msgid ""
"An unresolvable problem occurred while initializing the package "
"information.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"following error message:\n"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:258
msgid "Could not calculate the upgrade"
msgstr ""
#: ../SystemUpdater/UpdateManager.py:259
msgid ""
"An unresolvable problem occurred while calculating the upgrade.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"following error message:\n"
msgstr ""
#: ../SystemUpdater/Core/MyCache.py:388
msgid "This update does not come from a source that supports changelogs."
msgstr ""
#: ../SystemUpdater/Core/MyCache.py:394 ../SystemUpdater/Core/MyCache.py:429
msgid ""
"Failed to download the list of changes. \n"
"Please check your Internet connection."
msgstr ""
#: ../SystemUpdater/Core/MyCache.py:401
#, python-format
msgid ""
"Changes for %s versions:\n"
"Installed version: %s\n"
"Available version: %s\n"
"\n"
msgstr ""
#: ../SystemUpdater/Core/MyCache.py:415
#, python-format
msgid ""
"The changelog does not contain any relevant changes.\n"
"\n"
"Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"until the changes become available or try again later."
msgstr ""
#: ../SystemUpdater/Core/MyCache.py:422
#, python-format
msgid ""
"The list of changes is not available yet.\n"
"\n"
"Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"until the changes become available or try again later."
msgstr ""
#. Translators: the %s is a distro name, like 'Ubuntu' and 'base' as in
#. the core components and packages.
#: ../SystemUpdater/Core/UpdateList.py:175
#, python-format
msgid "%s base"
msgstr ""
#: ../SystemUpdater/Core/UpdateList.py:506
msgid "read important list failed"
msgstr ""
#. 不需要升级 全部的软件都是新的
#: ../SystemUpdater/Core/UpdateList.py:639
msgid "No software updates are available."
msgstr ""
#: ../SystemUpdater/Core/UpdateList.py:640
msgid "important_list is Empty"
msgstr ""
#. 不需要升级 全部的软件都是新的
#: ../SystemUpdater/Core/UpdateList.py:669
msgid "The software on this computer is up to date."
msgstr ""
#: ../SystemUpdater/Core/filter.py:223
#, python-format
msgid "Unable to parse %s."
msgstr ""
#: ../kylin-system-updater:24
msgid "Do not check for updates when starting"
msgstr ""
#: ../kylin-system-updater:26
msgid "Show debug messages"
msgstr ""

View File

@ -1,25 +1,21 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Funda Wang <fundawang@linux.net.cn>, 2005.
#
# YunQiang Su <wzssyqa@gmail.com>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: update-manager HEAD\n"
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: sebastian.heinlein@web.de\n"
"POT-Creation-Date: 2012-06-14 00:53+0100\n"
"PO-Revision-Date: 2012-04-10 10:40+0000\n"
"Last-Translator: Yiding He <yiding.he@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Launchpad-Export-Date: 2012-04-17 13:40+0000\n"
"X-Generator: Launchpad (build 15099)\n"
#. TRANSLATORS: download size of small updates, e.g. "250 kB"
#: ../DistUpgrade/utils.py:433 ../UpdateManager/Core/utils.py:433
@ -154,7 +150,7 @@ msgstr ""
#: ../DistUpgrade/DistUpgradeCache.py:711
#: ../UpdateManager/UpdateManager.py:1031
msgid "Could not calculate the upgrade"
msgstr "无法计算升级"
msgstr "不能计算升级"
#: ../DistUpgrade/DistUpgradeCache.py:762
msgid "Error authenticating some packages"
@ -297,7 +293,7 @@ msgstr ""
#: ../DistUpgrade/DistUpgradeController.py:368
#: ../DistUpgrade/DistUpgradeController.py:413
msgid "Can not upgrade"
msgstr "无法升级"
msgstr "不能升级"
#: ../DistUpgrade/DistUpgradeController.py:369
#, python-format
@ -695,7 +691,7 @@ msgstr "正在搜索废弃的软件"
#: ../DistUpgrade/DistUpgradeController.py:1726
msgid "System upgrade is complete."
msgstr "系统升级完成"
msgstr "系统升级完成"
#: ../DistUpgrade/DistUpgradeController.py:1775
msgid "The partial upgrade was completed."
@ -1266,7 +1262,7 @@ msgstr "包的删除可能会耗费几小时的时间。 "
#. FIXME: this should go into DistUpgradeController
#: ../DistUpgrade/DistUpgradeView.py:392 ../UpdateManager/UpdateManager.py:676
msgid "The software on this computer is up to date."
msgstr "此计算机中的软件是最新软件。"
msgstr "此计算机软件是最新的"
#: ../DistUpgrade/DistUpgradeView.py:393
msgid ""
@ -1476,7 +1472,7 @@ msgstr ""
#: ../DistUpgrade/DistUpgrade.ui.h:1
msgid "_Cancel Upgrade"
msgstr "取消升级(_C)"
msgstr "取消升级"
#: ../DistUpgrade/DistUpgrade.ui.h:2
msgid "_Resume Upgrade"
@ -1683,7 +1679,7 @@ msgstr[0] "该更新已下载完毕但未安装。"
#: ../UpdateManager/UpdateManager.py:589
msgid "There are no updates to install."
msgstr "没有更新需要安装。"
msgstr ""
#: ../UpdateManager/UpdateManager.py:598
msgid "Unknown download size."
@ -1782,18 +1778,18 @@ msgid ""
"An unresolvable problem occurred while initializing the package "
"information.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"Please report this bug against the 'kylin-system-updater' package and include the "
"following error message:\n"
msgstr ""
"初始化包信息时遇到无法解决的问题。\n"
"\n"
"请汇报这个“update-manager”软件包的错误并且将如下信息包含在报告中\n"
"请汇报这个“kylin-system-updater”软件包的错误并且将如下信息包含在报告中\n"
#: ../UpdateManager/UpdateManager.py:1032
msgid ""
"An unresolvable problem occurred while calculating the upgrade.\n"
"\n"
"Please report this bug against the 'update-manager' package and include the "
"Please report this bug against the 'kylin-system-updater' package and include the "
"following error message:"
msgstr ""
"在计算升级时遇到一个无法解决的问题。\n"
@ -1914,15 +1910,13 @@ msgstr "其它更新 (%s)"
#: ../UpdateManager/Core/MyCache.py:325
msgid "This update does not come from a source that supports changelogs."
msgstr "更新不是来源于支持日志变更的源。"
msgstr ""
#: ../UpdateManager/Core/MyCache.py:331 ../UpdateManager/Core/MyCache.py:359
msgid ""
"Failed to download the list of changes. \n"
"Please check your Internet connection."
msgstr ""
"无法下载更新列表。 \n"
"请检查您的网络连接。"
#: ../UpdateManager/Core/MyCache.py:338
#, python-format
@ -1945,10 +1939,6 @@ msgid ""
"Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"until the changes become available or try again later."
msgstr ""
"变更日志未包含任何有关的更改。\n"
"\n"
"请访问 http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"直到变更可用或再试一遍。"
#: ../UpdateManager/Core/MyCache.py:353
#, python-format
@ -1958,10 +1948,6 @@ msgid ""
"Please use http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"until the changes become available or try again later."
msgstr ""
"变更列表尚无法获取。\n"
"\n"
"请使用 http://launchpad.net/ubuntu/+source/%s/%s/+changelog\n"
"直到能够访问该列表或稍后再试。"
#: ../UpdateManager/Core/UpdateList.py:51
msgid "Failed to detect distribution"
@ -2204,6 +2190,12 @@ msgstr "进行带沙盒 aufs 隔离层的测试升级"
msgid "Running partial upgrade"
msgstr "运行部分升级"
msgid " Will be deleted Due to Upgrade "
msgstr " 将要被删除,由于升级 "
msgid " Will be deleted Due to Install "
msgstr " 将要被删除,由于安装 "
#: ../update-manager-text:59
msgid "Show description of the package instead of the changelog"
msgstr "显示包的说明而不是变更日志"
@ -2386,180 +2378,204 @@ msgstr "过期的 dpkg 状态条目"
msgid "Remove lilo since grub is also installed.(See bug #314004 for details.)"
msgstr "由于 grub 已安装,移除 lilo。(详情参见 bug #314004 。)"
#~ msgid ""
#~ "After your package information was updated the essential package '%s' can "
#~ "not be found anymore so a bug reporting process is being started."
#~ msgstr ""
#~ "更新包信息后就已找不到基本包(essential) '%s',因此即将启动错误报告进程。"
msgid ""
"After your package information was updated the essential package '%s' can "
"not be found anymore so a bug reporting process is being started."
msgstr ""
"更新包信息后就已找不到基本包(essential) '%s',因此即将启动错误报告进程。"
#~ msgid "<b><big>Upgrading Ubuntu to version 12.04</big></b>"
#~ msgstr "<b><big>正在将 Ubuntu 升级到 12.04 版</big></b>"
msgid "<b><big>Upgrading Ubuntu to version 12.04</big></b>"
msgstr "<b><big>正在将 Ubuntu 升级到 12.04 版</big></b>"
#~ msgid "%(count)s update has been selected."
#~ msgid_plural "%(count)s updates have been selected."
#~ msgstr[0] "已选择 %(count)s 个更新。"
msgid "%(count)s update has been selected."
msgid_plural "%(count)s updates have been selected."
msgstr[0] "已选择 %(count)s 个更新。"
#~ msgid "%(count_str)s %(download_str)s"
#~ msgstr "%(count_str)s %(download_str)s"
msgid "%(count_str)s %(download_str)s"
msgstr "%(count_str)s %(download_str)s"
#~ msgid "Welcome to Ubuntu"
#~ msgstr "欢迎使用 Ubuntu"
msgid "Welcome to Ubuntu"
msgstr "欢迎使用 Ubuntu"
#~ msgid ""
#~ "These software updates have been issued since this version of Ubuntu was "
#~ "released."
#~ msgstr "自正式发布起Ubuntu 已提供了下列软件更新。"
msgid ""
"These software updates have been issued since this version of Ubuntu was "
"released."
msgstr "自正式发布起Ubuntu 已提供了下列软件更新。"
#~ msgid "Software updates are available for this computer."
#~ msgstr "当前计算机有可用软件更新。"
msgid "Software updates are available for this computer."
msgstr "当前计算机有可用软件更新。"
#~ msgid "Update Manager"
#~ msgstr "更新管理器"
msgid "Update Manager"
msgstr "更新管理器"
#~ msgid "Starting Update Manager"
#~ msgstr "正在启动更新管理器"
msgid "Starting Update Manager"
msgstr "正在启动更新管理器"
#~ msgid "You are connected via a wireless modem."
#~ msgstr "您在使用无线调制解调器连接网络。"
msgid "You are connected via a wireless modem."
msgstr "您在使用无线调制解调器连接网络。"
#~ msgid "_Install Updates"
#~ msgstr "安装更新(_I)"
msgid "_Install Updates"
msgstr "安装更新(_I)"
#~ msgid "Checking for a new ubuntu release"
#~ msgstr "检查新的 Ubuntu 发行版本"
msgid "Checking for a new ubuntu release"
msgstr "检查新的 Ubuntu 发行版本"
#~ msgid "Your system is up-to-date"
#~ msgstr "您的系统已为最新"
msgid "Your system is up-to-date"
msgstr "您的系统已为最新"
#~ msgid ""
#~ "Fetching and installing the upgrade can take several hours. Once the "
#~ "download has finished, the process cannot be cancelled."
#~ msgstr "获取并安装升级可能会持续几个小时。一旦下载结束,进程将不能被取消。"
msgid ""
"Fetching and installing the upgrade can take several hours. Once the "
"download has finished, the process cannot be cancelled."
msgstr "获取并安装升级可能会持续几个小时。一旦下载结束,进程将不能被取消。"
#~ msgid ""
#~ "If you don't want to install them now, choose \"Update Manager\" from the "
#~ "Administration menu later."
#~ msgstr ""
#~ "如果您不想现在安装,稍后可以在“系统管理”菜单选择“更新管理器”进行安装。"
msgid ""
"If you don't want to install them now, choose \"Update Manager\" from the "
"Administration menu later."
msgstr "如果您不想现在安装,稍后可以在“系统管理”菜单选择“更新管理器”进行安装。"
#~ msgid ""
#~ "This upgrade is running in sandbox (test) mode. All changes are written "
#~ "to '%s' and will be lost on the next reboot.\n"
#~ "\n"
#~ "*No* changes written to a systemdir from now until the next reboot are "
#~ "permanent."
#~ msgstr ""
#~ "这个升级正运行在沙盒(测试)模式下。所有的变更都被写入“%s”并在下次重启时丢"
#~ "失。\n"
#~ "\n"
#~ "从现在起直到下次重启,被写入 systemdir 的变更*不是*永久的。"
msgid ""
"This upgrade is running in sandbox (test) mode. All changes are written to "
"'%s' and will be lost on the next reboot.\n"
"\n"
"*No* changes written to a systemdir from now until the next reboot are "
"permanent."
msgstr ""
"这个升级正运行在沙盒(测试)模式下。所有的变更都被写入“%s”并在下次重启时丢"
"失。\n"
"\n"
"从现在起直到下次重启,被写入 systemdir 的变更*不是*永久的。"
#~ msgid "Software updates are available for this computer"
#~ msgstr "有适合当前系统的软件更新"
msgid "Software updates are available for this computer"
msgstr "有适合当前系统的软件更新"
#~ msgid "There are no updates to install"
#~ msgstr "没有可安装的更新"
msgid "There are no updates to install"
msgstr "没有可安装的更新"
#~ msgid "The update has already been downloaded, but not installed"
#~ msgid_plural "The updates have already been downloaded, but not installed"
#~ msgstr[0] "更新已经下载,但还没有安装。"
msgid "The update has already been downloaded, but not installed"
msgid_plural "The updates have already been downloaded, but not installed"
msgstr[0] "更新已经下载,但还没有安装。"
#~ msgid ""
#~ "You will not get any further security fixes or critical updates. Please "
#~ "upgrade to a later version of Ubuntu Linux."
#~ msgstr "您不会再收到任何安全更新。请升级到更新版本的 Ubuntu。"
msgid ""
"You will not get any further security fixes or critical updates. Please "
"upgrade to a later version of Ubuntu Linux."
msgstr "您不会再收到任何安全更新。请升级到更新版本的 Ubuntu。"
#~ msgid ""
#~ "If you don't want to install them now, choose \"Update Manager\" from "
#~ "Applications later."
#~ msgstr "如果您不想现在安装,可以今后再从应用程序中打开“更新管理器”。"
msgid ""
"If you don't want to install them now, choose \"Update Manager\" from "
"Applications later."
msgstr "如果您不想现在安装,可以今后再从应用程序中打开“更新管理器”。"
#~ msgid "0 kB"
#~ msgstr "0 kB"
msgid "0 kB"
msgstr "0 kB"
#~ msgid "1 kB"
#~ msgstr "1 kB"
msgid "1 kB"
msgstr "1 kB"
#~ msgid ""
#~ "The system was unable to get the prerequisites for the upgrade. The "
#~ "upgrade will abort now and restore the original system state.\n"
#~ "\n"
#~ "Please report this as a bug using the command 'ubuntu-bug update-manager' "
#~ "in a terminal and include the files in /var/log/dist-upgrade/ in the bug "
#~ "report."
#~ msgstr ""
#~ "系统无法获取升级所必需的文件。将放弃升级并恢复到原始系统状态。\n"
#~ "\n"
#~ "请在终端里输入命令ubuntu-bug update-manager来报告这个 bug。在报告 bug 时"
#~ "附上位于 /var/log/dist-upgrade/ 的文件。"
msgid ""
"The system was unable to get the prerequisites for the upgrade. The upgrade "
"will abort now and restore the original system state.\n"
"\n"
"Please report this as a bug using the command 'ubuntu-bug update-manager' in "
"a terminal and include the files in /var/log/dist-upgrade/ in the bug report."
msgstr ""
"系统无法获取升级所必需的文件。将放弃升级并恢复到原始系统状态。\n"
"\n"
"请在终端里输入命令ubuntu-bug update-manager来报告这个 bug。在报告 bug 时附"
"上位于 /var/log/dist-upgrade/ 的文件。"
#~ msgid ""
#~ "After your package information was updated the essential package '%s' can "
#~ "not be found anymore.\n"
#~ "This indicates a serious error, please report this bug using the command "
#~ "'ubuntu-bug update-manager' in a terminal and include the files in /var/"
#~ "log/dist-upgrade/ in the bug report."
#~ msgstr ""
#~ "在更新了您的软件包信息之后,系统找不到‘%s这个必需的软件包。\n"
#~ "这预示着一个严重错误。在终端里输入命令ubuntu-bug update-manager来报告这"
#~ "bug。在报告 bug 时附上位于 /var/log/dist-upgrade/ 的文件。"
msgid ""
"After your package information was updated the essential package '%s' can "
"not be found anymore.\n"
"This indicates a serious error, please report this bug using the command "
"'ubuntu-bug update-manager' in a terminal and include the files in /var/log/"
"dist-upgrade/ in the bug report."
msgstr ""
"在更新了您的软件包信息之后,系统找不到‘%s这个必需的软件包。\n"
"这预示着一个严重错误。在终端里输入命令ubuntu-bug update-manager来报告这"
"bug。在报告 bug 时附上位于 /var/log/dist-upgrade/ 的文件。"
#~ msgid "Your graphics hardware may not be fully supported in Ubuntu 11.04."
#~ msgstr "您的显卡可能无法完整地被 Ubuntu 11.04 支持。"
msgid "Your graphics hardware may not be fully supported in Ubuntu 11.04."
msgstr "您的显卡可能无法完整地被 Ubuntu 11.04 支持。"
#~ msgid ""
#~ "The support in Ubuntu 11.04 for your intel graphics hardware is limited "
#~ "and you may encounter problems after the upgrade. Do you want to continue "
#~ "with the upgrade?"
#~ msgstr ""
#~ "Ubuntu 11.04 对您的 intel 显卡支持有限。您可能在升级之后会遇到问题,确定要"
#~ "续升级吗?"
msgid ""
"The support in Ubuntu 11.04 for your intel graphics hardware is limited and "
"you may encounter problems after the upgrade. Do you want to continue with "
"the upgrade?"
msgstr ""
"Ubuntu 11.04 对您的 intel 显卡支持有限。您可能在升级之后会遇到问题,确定要"
"续升级吗?"
#~ msgid ""
#~ "\n"
#~ "\n"
#~ "Please report this bug using the command 'ubuntu-bug update-manager' in a "
#~ "terminal and include the files in /var/log/dist-upgrade/ in the bug "
#~ "report.\n"
#~ "%s"
#~ msgstr ""
#~ "\n"
#~ "\n"
#~ "请在终端里输入命令ubuntu-bug update-manager来报告这个 bug。在报告 bug 时"
#~ "附上位于 /var/log/dist-upgrade/ 的文件。\n"
#~ "%s"
msgid ""
"\n"
"\n"
"Please report this bug using the command 'ubuntu-bug update-manager' in a "
"terminal and include the files in /var/log/dist-upgrade/ in the bug report.\n"
"%s"
msgstr ""
"\n"
"\n"
"请在终端里输入命令ubuntu-bug update-manager来报告这个 bug。在报告 bug 时附"
"上位于 /var/log/dist-upgrade/ 的文件。\n"
"%s"
#~ msgid ""
#~ "Preparing the system for the upgrade failed. Please report this using the "
#~ "command 'ubuntu-bug update-manager' in a terminal and include the files "
#~ "in /var/log/dist-upgrade/ in the bug report."
#~ msgstr ""
#~ "无法获取要升级的系统。请在终端里输入命令ubuntu-bug update-manager来报告"
#~ "个 bug。在报告 bug 时附上位于 /var/log/dist-upgrade/ 的文件。"
msgid ""
"Preparing the system for the upgrade failed. Please report this using the "
"command 'ubuntu-bug update-manager' in a terminal and include the files in /"
"var/log/dist-upgrade/ in the bug report."
msgstr ""
"无法获取要升级的系统。请在终端里输入命令ubuntu-bug update-manager来报告"
"个 bug。在报告 bug 时附上位于 /var/log/dist-upgrade/ 的文件。"
#~ msgid ""
#~ "Upgrading the repository information resulted in a invalid file. Please "
#~ "report this as a bug using the command 'ubuntu-bug update-manager' in a "
#~ "terminal."
#~ msgstr ""
#~ "升级目录信息得到一个非法的文件。请在终端里输入命令ubuntu-bug update-"
#~ "manager来报告这个 bug。"
msgid ""
"Upgrading the repository information resulted in a invalid file. Please "
"report this as a bug using the command 'ubuntu-bug update-manager' in a "
"terminal."
msgstr ""
"升级目录信息得到一个非法的文件。请在终端里输入命令ubuntu-bug update-"
"manager来报告这个 bug。"
#~ msgid ""
#~ "These software updates have been issued since this version of Ubuntu was "
#~ "released. If you don't want to install them now, choose \"Update Manager"
#~ "\" from Applications later."
#~ msgstr ""
#~ "这些软件的更新在该版本的 Ubuntu 发行之后被证明有问题。如果您不想现在安装它"
#~ "们,可以在稍后从系统应用“更新管理器”中选择安装。"
msgid ""
"These software updates have been issued since this version of Ubuntu was "
"released. If you don't want to install them now, choose \"Update Manager\" "
"from Applications later."
msgstr ""
"这些软件的更新在该版本的 Ubuntu 发行之后被证明有问题。如果您不想现在安装它"
"们,可以在稍后从系统应用“更新管理器”中选择安装。"
#~ msgid ""
#~ "These software updates have been issued since this version of Ubuntu was "
#~ "released. If you don't want to install them now, choose \"Update Manager"
#~ "\" from the Administration Menu later."
#~ msgstr ""
#~ "这些软件的更新在该版本的 Ubuntu 发行之后被证明有问题。如果您不想现在安装它"
#~ "们,可以在稍后从管理员菜单“更新管理器”中选择安装。"
msgid ""
"These software updates have been issued since this version of Ubuntu was "
"released. If you don't want to install them now, choose \"Update Manager\" "
"from the Administration Menu later."
msgstr ""
"这些软件的更新在该版本的 Ubuntu 发行之后被证明有问题。如果您不想现在安装它"
"们,可以在稍后从管理员菜单“更新管理器”中选择安装。"
#~ msgid "%.0f kB"
#~ msgstr "%.0f kB"
msgid "%.0f kB"
msgstr "%.0f kB"
msgid "Failed to get update software push, please try to update again later"
msgstr "获取更新软件推送失败,请稍后再进行尝试更新"
msgid "Connection exception with push server"
msgstr "推送服务器连接异常"
msgid "update important list occur Exception"
msgstr "获取推送出现异常"
msgid "You need to be root to run this application"
msgstr "你需要root权限运行"
msgid "There are no packages that need to be upgraded and installed"
msgstr "没有需要升级和安装的包"
msgid "Check if the upgrade package does not exist for this upgrade"
msgstr "检查升级包是否不存在本次升级"
msgid "read important list failed"
msgstr "读取推送升级列表失败"
msgid "groups JSON ConfigPkgs install failed"
msgstr "分组配置包安装失败"
msgid "Installtion timeout to exit Due to inactivity"
msgstr "安装超时退出由于"