Merge branch 'dev' of ssh://172.17.66.163:10022/wangsong/kylin-system-updater into dev

This commit is contained in:
wangsong 2021-09-29 11:03:21 +08:00
commit b730bf1e59
4 changed files with 17 additions and 605 deletions

8
.gitignore vendored
View File

@ -5,6 +5,14 @@ __pycache__
.vscode
.pybuild
build
debian/files
debian/.debhelper
debian/kylin-system-updater
debian/kylin-system-updater.debhelper.log
debian/kylin-system-updater.postinst.debhelper
debian/kylin-system-updater.prerm.debhelper
debian/kylin-system-updater.substvars
po/kylin-system-updater.pot
# Misc
.*cache

View File

@ -207,12 +207,12 @@ class UpdateManagerDbusController(dbus.service.Object):
success,upgrade_group, error_string,error_desc)
#发送下载包信息
@dbus.service.signal(INTERFACE, signature='iiiii')
def UpdateDownloadInfo(self, current_items, total_items, currenty_bytes, total_bytes, current_cps):
logging.info("emit current_items = %d, total_items = %d, currenty_bytes = %d, total_bytes = %d, current_cps = %d .",\
@dbus.service.signal(INTERFACE, signature='iiiiis')
def UpdateDownloadInfo(self, current_items, total_items, currenty_bytes, total_bytes, current_cps, current_details):
logging.info("emit current_items = %d, total_items = %d, currenty_bytes = %d, total_bytes = %d, current_cps = %d, current_details = %s.",\
current_items, total_items, \
currenty_bytes, total_bytes,\
current_cps)
current_cps, current_details)
# 信号是否可取消
@dbus.service.signal(INTERFACE, signature='b')

View File

@ -28,6 +28,7 @@ class InstallBackendAptdaemon(InstallBackend):
self.trans_progress = 0
self.trans_status = ''
self.details = ''
@inline_callbacks
def update(self):
@ -100,7 +101,8 @@ class InstallBackendAptdaemon(InstallBackend):
self.window_main.dbusController.UpdateDloadAndInstStaChanged(self.now_upgrade_list,self.trans_progress,self.trans_status)
def _on_details_changed(self, trans, details):
logging.info(details)
self.details = details
# logging.info("details: %s", details)
def _on_download_changed(self, trans, details):
logging.info(details)
@ -111,7 +113,7 @@ class InstallBackendAptdaemon(InstallBackend):
self.window_main.dbusController.UpdateDownloadInfo(\
current_items, total_items, \
currenty_bytes, total_bytes, \
current_cps)
current_cps, self.details)
def _on_cancellable_changed(self, trans, Cancelable):
self.window_main.dbusController.Cancelable(Cancelable)
@ -133,7 +135,7 @@ class InstallBackendAptdaemon(InstallBackend):
trans.connect("progress-details-changed", self._on_progress_download_changed)
# trans.connect("medium-required", self._on_medium_required)
# trans.connect("status-details-changed", self._on_details_changed)
trans.connect("status-details-changed", self._on_details_changed)
#状态改变的时候的回调函数
# trans.connect("download-changed", self._on_download_changed)
# trans.connect("config-file-conflict", self._on_config_file_conflict)

View File

@ -1,598 +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.
#
#: ../UpdateManager/UpdatesAvailable.py:844
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-12 14:05-0400\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=INTEGER; plural=EXPRESSION;\n"
#: ../UpdateManager/backend/InstallBackendAptdaemon.py:67
msgid "Checking for updates…"
msgstr ""
#: ../UpdateManager/backend/InstallBackendAptdaemon.py:92
msgid "Installing updates…"
msgstr ""
#: ../UpdateManager/backend/InstallBackendSynaptic.py:40
msgid "Please wait, this can take some time."
msgstr ""
#: ../UpdateManager/backend/InstallBackendSynaptic.py:42
msgid "Update is complete"
msgstr ""
#: ../UpdateManager/ChangelogViewer.py:83
msgid "Open Link in Browser"
msgstr ""
#: ../UpdateManager/ChangelogViewer.py:87
msgid "Copy Link to Clipboard"
msgstr ""
#: ../UpdateManager/Dialogs.py:122
msgid "Settings…"
msgstr ""
#: ../UpdateManager/Dialogs.py:164
#, python-format
msgid "%d Livepatch update applied since the last restart."
msgid_plural "%d Livepatch updates applied since the last restart."
msgstr[0] ""
msgstr[1] ""
#: ../UpdateManager/Dialogs.py:172
#, python-format
msgid "%d Livepatch update failed to apply since the last restart."
msgid_plural "%d Livepatch updates failed to apply since the last restart."
msgstr[0] ""
msgstr[1] ""
#: ../UpdateManager/Dialogs.py:194 ../UpdateManager/UpdateManager.py:262
msgid "You stopped the check for updates."
msgstr ""
#: ../UpdateManager/Dialogs.py:196
msgid "_Check Again"
msgstr ""
#: ../UpdateManager/Dialogs.py:208
msgid "No software updates are available."
msgstr ""
#: ../UpdateManager/Dialogs.py:210 ../UpdateManager/Dialogs.py:221
msgid "The software on this computer is up to date."
msgstr ""
#. Translators: these are Ubuntu version names like "Ubuntu 12.04"
#: ../UpdateManager/Dialogs.py:223
#, python-format
msgid "However, %s %s is now available (you have %s)."
msgstr ""
#: ../UpdateManager/Dialogs.py:228
msgid "Upgrade…"
msgstr ""
#: ../UpdateManager/Dialogs.py:248
msgid "New important security and hardware support update."
msgstr ""
#: ../UpdateManager/Dialogs.py:256
msgid "_Install…"
msgstr ""
#. Translators: this is an Ubuntu version name like "Ubuntu 12.04"
#: ../UpdateManager/Dialogs.py:268
#, python-format
msgid "Software updates are no longer provided for %s %s."
msgstr ""
#. Translators: this is an Ubuntu version name like "Ubuntu 12.04"
#: ../UpdateManager/Dialogs.py:272
#, python-format
msgid "To stay secure, you should upgrade to %s %s."
msgstr ""
#: ../UpdateManager/Dialogs.py:285
msgid "Not all updates can be installed"
msgstr ""
#: ../UpdateManager/Dialogs.py:287
msgid ""
"Run a partial upgrade, to install as many updates as possible.\n"
"\n"
" This can be caused by:\n"
" * A previous upgrade which didn't complete\n"
" * Problems with some of the installed software\n"
" * Unofficial software packages not provided by Ubuntu\n"
" * Normal changes of a pre-release version of Ubuntu"
msgstr ""
#: ../UpdateManager/Dialogs.py:295
msgid "_Partial Upgrade"
msgstr ""
#: ../UpdateManager/Dialogs.py:296
msgid "_Continue"
msgstr ""
#: ../UpdateManager/Dialogs.py:332
msgid "_Try Again"
msgstr ""
#: ../UpdateManager/Dialogs.py:346
msgid "The computer needs to restart to finish installing updates."
msgstr ""
#: ../UpdateManager/Dialogs.py:348
msgid "Restart _Later"
msgstr ""
#: ../UpdateManager/Dialogs.py:350
msgid "_Restart Now"
msgstr ""
#. Basic GTK+ parameters
#: ../UpdateManager/UpdateManager.py:91 ../data/update-manager.desktop.in.h:1
#: ../data/update-manager.appdata.xml.in.h:1
msgid "Software Updater"
msgstr ""
#: ../UpdateManager/UpdateManager.py:260
msgid "Some software couldnt be checked for updates."
msgstr ""
#: ../UpdateManager/UpdateManager.py:263
msgid "Updated software is available from a previous check."
msgstr ""
#. we assert a clean cache
#: ../UpdateManager/UpdateManager.py:373
msgid "Software index is broken"
msgstr ""
#: ../UpdateManager/UpdateManager.py:374
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 ""
#: ../UpdateManager/UpdateManager.py:380
msgid "Could not initialize the package information"
msgstr ""
#: ../UpdateManager/UpdateManager.py:381
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 ""
#: ../UpdateManager/UpdateManager.py:398
msgid "Could not calculate the upgrade"
msgstr ""
#: ../UpdateManager/UpdateManager.py:399
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 ""
#: ../UpdateManager/UpdatesAvailable.py:252
msgid "Install Now"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:285
msgid "Install or remove"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:319
msgid "Download"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:378
msgid "_Remind Me Later"
msgstr ""
#. upload_archive = version_match.group(2).strip()
#: ../UpdateManager/UpdatesAvailable.py:515
#, python-format
msgid "Version %s: \n"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:578
msgid ""
"No network connection detected, you can not download changelog information."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:588
msgid "Downloading list of changes..."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:632
msgid "_Deselect All"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:638
msgid "Select _All"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:733
#, python-format
msgid "%s will be downloaded."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:747
msgid "The update has already been downloaded."
msgid_plural "The updates have already been downloaded."
msgstr[0] ""
msgstr[1] ""
#: ../UpdateManager/UpdatesAvailable.py:753
msgid "There are no updates to install."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:762
msgid "Unknown download size."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:789
#, python-format
msgid ""
"Updated software has been issued since %s %s was released. Do you want to "
"install it now?"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:794
msgid ""
"Updated software is available for this computer. Do you want to install it "
"now?"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:797
msgid ""
"The computer also needs to restart to finish installing previous updates."
msgstr ""
#. print("on_button_install_clicked")
#: ../UpdateManager/UpdatesAvailable.py:827
msgid "Not enough free disk space"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:828
#, 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
#: ../UpdateManager/UpdatesAvailable.py:833
msgid ""
"Remove temporary packages of former installations using 'sudo apt clean'."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:835
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 ""
#: ../UpdateManager/UpdatesAvailable.py:840
msgid ""
"Empty your trash and remove temporary packages of former installations using "
"'sudo apt clean'."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:843
msgid "Reboot to clean up files in /tmp."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:885
msgid "Connecting..."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:901
msgid "You may not be able to check for updates or download new updates."
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:1053
msgid "Security updates"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:1056
msgid "Other updates"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:1058
msgid "Updates"
msgstr ""
#: ../UpdateManager/UpdatesAvailable.py:1063
msgid "Unused kernel updates to be removed"
msgstr ""
#: ../UpdateManager/UnitySupport.py:70
msgid "Install All Available Updates"
msgstr ""
#: ../UpdateManager/Core/MyCache.py:412
msgid "This update does not come from a source that supports changelogs."
msgstr ""
#: ../UpdateManager/Core/MyCache.py:418 ../UpdateManager/Core/MyCache.py:453
msgid ""
"Failed to download the list of changes. \n"
"Please check your Internet connection."
msgstr ""
#: ../UpdateManager/Core/MyCache.py:425
#, python-format
msgid ""
"Changes for %s versions:\n"
"Installed version: %s\n"
"Available version: %s\n"
"\n"
msgstr ""
#: ../UpdateManager/Core/MyCache.py:439
#, 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 ""
#: ../UpdateManager/Core/MyCache.py:446
#, 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.
#: ../UpdateManager/Core/UpdateList.py:174
#, python-format
msgid "%s base"
msgstr ""
#. TRANSLATORS: download size of small updates, e.g. "250 kB"
#: ../UpdateManager/Core/utils.py:475
#, python-format
msgid "%(size).0f kB"
msgid_plural "%(size).0f kB"
msgstr[0] ""
msgstr[1] ""
#. TRANSLATORS: download size of updates, e.g. "2.3 MB"
#: ../UpdateManager/Core/utils.py:479
#, python-format
msgid "%.1f MB"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:1
msgid "updates"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:2
msgid "Changes"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:3
msgid "Description"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:4
msgid "Technical description"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:5
msgid "Details of updates"
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:6
msgid "The computer will need to restart."
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:7
msgid ""
"You are connected via roaming and may be charged for the data consumed by "
"this update."
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:8
msgid ""
"You may want to wait until youre not using a mobile broadband connection."
msgstr ""
#: ../data/gtkbuilder/UpdateManager.ui.h:9
msgid "Its safer to connect the computer to AC power before updating."
msgstr ""
#: ../data/update-manager.desktop.in.h:2
msgid "Software Updates"
msgstr ""
#: ../data/update-manager.desktop.in.h:3
#: ../data/update-manager.appdata.xml.in.h:2
msgid "Show and install available updates"
msgstr ""
#: ../data/update-manager.appdata.xml.in.h:3
msgid ""
"Software Updater checks for updates using apt and let you choose which "
"updates to install."
msgstr ""
#: ../update-manager:71
msgid "Show version and exit"
msgstr ""
#: ../update-manager:74
msgid "Directory that contains the data files"
msgstr ""
#: ../update-manager:77
msgid "Check if a new Ubuntu release is available"
msgstr ""
#: ../update-manager:80
msgid ""
"If using the latest supported release, upgrade to the development release"
msgstr ""
#: ../update-manager:84
msgid "Upgrade using the latest proposed version of the release upgrader"
msgstr ""
#: ../update-manager:91
msgid "Do not focus on map when starting"
msgstr ""
#: ../update-manager:94
msgid "Do not check for updates when starting"
msgstr ""
#: ../update-manager:96
msgid "Show debug messages"
msgstr ""
#: ../ubuntu-support-status:68
msgid "Community"
msgstr ""
#: ../ubuntu-support-status:109
msgid "Show unsupported packages on this machine"
msgstr ""
#: ../ubuntu-support-status:112
msgid "Show supported packages on this machine"
msgstr ""
#: ../ubuntu-support-status:115
msgid "Show all packages with their status"
msgstr ""
#: ../ubuntu-support-status:118
msgid "Show all packages in a list"
msgstr ""
#: ../ubuntu-support-status:180
#, c-format
msgid "Support status summary of '%s':"
msgstr ""
#: ../ubuntu-support-status:183
msgid "You have %(num)s packages (%(percent).1f%%) supported until %(time)s"
msgstr ""
#: ../ubuntu-support-status:189
msgid ""
"You have %(num)s packages (%(percent).1f%%) that can not/no-longer be "
"downloaded"
msgstr ""
#: ../ubuntu-support-status:192
msgid "You have %(num)s packages (%(percent).1f%%) that are unsupported"
msgstr ""
#: ../ubuntu-support-status:205
msgid ""
"Run with --show-unsupported, --show-supported or --show-all to see more "
"details"
msgstr ""
#: ../ubuntu-support-status:209
msgid "No longer downloadable:"
msgstr ""
#: ../ubuntu-support-status:212
msgid "Unsupported: "
msgstr ""
#: ../ubuntu-support-status:217
#, c-format
msgid "Supported until %s:"
msgstr ""
#: ../ubuntu-support-status:226
msgid "Unsupported"
msgstr ""
#. Why do we use %s here instead of $strings or {} format placeholders?
#. It's because we don't want to break existing translations.
#: ../janitor/plugincore/exceptions.py:43
#, python-format
msgid "Unimplemented method: %s"
msgstr ""
#: ../janitor/plugincore/core/file_cruft.py:41
msgid "A file on disk"
msgstr ""
#: ../janitor/plugincore/core/missing_package_cruft.py:40
msgid "Install missing package."
msgstr ""
#. 2012-06-08 BAW: i18n string; don't use {} or PEP 292.
#: ../janitor/plugincore/core/missing_package_cruft.py:50
#, python-format
msgid "Package %s should be installed."
msgstr ""
#: ../janitor/plugincore/core/package_cruft.py:50
msgid ".deb package"
msgstr ""
#: ../janitor/plugincore/plugins/langpack_manual_plugin.py:47
#, python-format
msgid "%s needs to be marked as manually installed."
msgstr ""
#: ../janitor/plugincore/plugins/kdelibs4to5_plugin.py:50
msgid ""
"When upgrading, if kdelibs4-dev is installed, kdelibs5-dev needs to be "
"installed. See bugs.launchpad.net, bug #279621 for details."
msgstr ""
#: ../janitor/plugincore/plugins/dpkg_status_plugin.py:45
#, python-format
msgid "%i obsolete entries in the status file"
msgstr ""
#: ../janitor/plugincore/plugins/dpkg_status_plugin.py:48
msgid "Obsolete entries in dpkg status"
msgstr ""
#. pragma: no cover
#: ../janitor/plugincore/plugins/dpkg_status_plugin.py:51
msgid "Obsolete dpkg status entries"
msgstr ""
#: ../janitor/plugincore/plugins/remove_lilo_plugin.py:43
msgid "Remove lilo since grub is also installed.(See bug #314004 for details.)"
msgstr ""