减少换行符 写入数据库的
This commit is contained in:
parent
993511903f
commit
e39f51f9ae
|
@ -276,7 +276,6 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
|
||||
if self.transaction.cancellable == True:
|
||||
self.transaction.cancel()
|
||||
|
||||
status = True
|
||||
logging.info("dbus-mothod cancel task Success")
|
||||
else:
|
||||
|
@ -284,9 +283,7 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
logging.info("cancel task Failed")
|
||||
|
||||
except Exception as e:
|
||||
logging.info("cancel task Failed")
|
||||
logging.error(str(e))
|
||||
status = False
|
||||
logging.error("cancel task Failed" + str(e))
|
||||
return status
|
||||
return status
|
||||
|
||||
|
|
|
@ -478,14 +478,14 @@ class InstallBackend():
|
|||
if pkg_obj.is_installed == True and pkg_obj.installed.source_version + pkg_obj.name in self.upgrade_data.adjust_pkgs:
|
||||
total_pkg.remove(pkg)
|
||||
else:
|
||||
pkg_error = '\n\n'+ "This groups-package("+pkg+") is not install or upgrade" + '\n\n'
|
||||
pkg_error = '\n'+ "This groups-package("+pkg+") is not install or upgrade" + '\n'
|
||||
group_error_log += pkg_error
|
||||
logging.warning(pkg_error)
|
||||
else:
|
||||
if pkg_obj.is_installed == True and pkg_obj.is_upgradable == False:
|
||||
total_pkg.remove(pkg)
|
||||
else:
|
||||
pkg_error = '\n\n'+ "This groups-package("+pkg+") is not install or upgrade" + '\n\n'
|
||||
pkg_error = '\n'+ "This groups-package("+pkg+") is not install or upgrade" + '\n'
|
||||
group_error_log += pkg_error
|
||||
logging.warning(pkg_error)
|
||||
#如果没有
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
## DBUS接口
|
||||
|
||||
[TOC]
|
||||
|
||||
|
||||
|
||||
### 描述
|
||||
|
||||
实现系统升级以python apt库和aptdeamon的形式
|
||||
|
@ -37,7 +41,7 @@
|
|||
| InstalldebFile | ssb | b | 安装本地deb包 | |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
#### Method分析
|
||||
### Method分析
|
||||
|
||||
#### UpdateDetect
|
||||
|
||||
|
@ -74,7 +78,6 @@
|
|||
|
||||
|
||||
|
||||
-
|
||||
|
||||
#### UpdateDownloadInfo
|
||||
|
||||
|
@ -138,52 +141,9 @@
|
|||
|
||||
|
||||
|
||||
#### PurgePkgStatusChanged
|
||||
|
||||
- `介绍:`卸载的进度信息和状态信息以及状态的细节信息
|
||||
|
||||
- `出参`:`i:`卸载的进度信息从0-100%,`s:`卸载的状态信息,`s:`卸载的细节信息
|
||||
|
||||
- `示例:`
|
||||
|
||||
```sh
|
||||
INFO:emit PurgePkgStatusChanged progress = 63 , status = 正在应用更改 ,current_details = 正在准备删除 kylin-video
|
||||
INFO:emit PurgePkgStatusChanged progress = 76 , status = 正在应用更改 ,current_details = 正在卸载 kylin-video
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
#### UpdateDetectFinished
|
||||
|
||||
- `介绍:`卸载的完成的信号
|
||||
|
||||
- `出参`: `b:`卸载是否成功,`s:`产生错误的结果,`s:`产生错误的原因
|
||||
|
||||
- `示例:`
|
||||
|
||||
```sh
|
||||
#卸载完成
|
||||
PurgePackagesFinished success = True , error_string = 卸载完成。 , error_desc =
|
||||
|
||||
#卸载失败
|
||||
PurgePackagesFinished success = False , error_string = 软件包不存在 , error_desc = 检查包名的拼写是否正确,以及是否启用了相应的仓库。
|
||||
PurgePackagesFinished success = False , error_string = 软件包没有安装 , error_desc = 不需要进行卸载。
|
||||
|
||||
#卸载失败 由于正在处理其他任务也同样会报错
|
||||
PurgePackagesFinished success = False , error_string = 其他任务正在更新升级中,请稍后再卸载。 , error_desc =
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### Signal列表
|
||||
### Signal列表
|
||||
|
||||
| Signal Name | Output Args | means |
|
||||
| ---------------------------- | ----------- | ------------------------ |
|
||||
|
@ -197,14 +157,14 @@
|
|||
| Cancelable | b | 是否可取消 |
|
||||
| UpdateSqlitSingle | | |
|
||||
| FixBrokenStatusChanged | iiisss | 修复依赖的状态信号 |
|
||||
| | | |
|
||||
| | | |
|
||||
| PurgePackagesFinished | iss | 卸载完成信号 |
|
||||
| PurgePkgStatusChanged | bss | 卸载进度信息以及状态信息 |
|
||||
| | | |
|
||||
| | | |
|
||||
|
||||
|
||||
|
||||
#### Signal分析
|
||||
### Signal分析
|
||||
|
||||
#### UpdateDetectStatusChanged
|
||||
|
||||
|
@ -297,6 +257,47 @@
|
|||
|
||||
|
||||
|
||||
#### PurgePkgStatusChanged
|
||||
|
||||
- `介绍:`卸载的进度信息和状态信息以及状态的细节信息
|
||||
|
||||
- `出参`:`i:`卸载的进度信息从0-100%,`s:`卸载的状态信息,`s:`卸载的细节信息
|
||||
|
||||
- `示例:`
|
||||
|
||||
```sh
|
||||
INFO:emit PurgePkgStatusChanged progress = 63 , status = 正在应用更改 ,current_details = 正在准备删除 kylin-video
|
||||
INFO:emit PurgePkgStatusChanged progress = 76 , status = 正在应用更改 ,current_details = 正在卸载 kylin-video
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
#### PurgePackagesFinished
|
||||
|
||||
- `介绍:`卸载的完成的信号
|
||||
|
||||
- `出参`: `b:`卸载是否成功,`s:`产生错误的结果,`s:`产生错误的原因
|
||||
|
||||
- `示例:`
|
||||
|
||||
```sh
|
||||
#卸载完成
|
||||
PurgePackagesFinished success = True , error_string = 卸载完成。 , error_desc =
|
||||
|
||||
#卸载失败
|
||||
PurgePackagesFinished success = False , error_string = 软件包不存在 , error_desc = 检查包名的拼写是否正确,以及是否启用了相应的仓库。
|
||||
PurgePackagesFinished success = False , error_string = 软件包没有安装 , error_desc = 不需要进行卸载。
|
||||
|
||||
#卸载失败 由于正在处理其他任务也同样会报错
|
||||
PurgePackagesFinished success = False , error_string = 其他任务正在更新升级中,请稍后再卸载。 , error_desc =
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue