Merge branch 'backend_dev' of gitlab2.kylin.com:kylin-desktop/update-manager-group/kylin-system-updater into backend_dev

This commit is contained in:
wangsong 2021-12-24 15:05:25 +08:00
commit 5ea319a109
3 changed files with 21 additions and 2 deletions

View File

@ -626,6 +626,9 @@ class UpdateManager():
# 需要降级
try:
pkg = deb_cache[debname.split('_')[0]]
# 判断":"在版本号中的情况
if "%3a" in debname:
debname=debname.replace("%3a",":")
if pkg.is_installed and pkg.installed.source_version > debname.split('_')[1]:
logging.info("Downgrade deb %s, from %s to %s.",\
debname.split('_')[0], pkg.installed.source_version,debname.split('_')[1])
@ -657,13 +660,19 @@ class UpdateManager():
def _gen_noSatisfyList(self, depends, deb_cache):
_noSatisfyList = []
_group_satify = False
for or_group in depends:
for deb in or_group:
debname,ver,oper = deb
if ":" in debname:
debname=debname.split(":")[0]
try:
pkg = deb_cache[debname]
if not pkg.installed or not apt_pkg.check_dep(pkg.installed.source_version, oper, ver):
_noSatisfyList.append(or_group)
if pkg.installed and apt_pkg.check_dep(pkg.installed.source_version, oper, ver) and _group_satify == False:
_group_satify = True
except Exception as e:
logging.error(str(e))
if _group_satify == False and or_group not in _noSatisfyList:
_noSatisfyList.append(or_group)
_group_satify = False
return _noSatisfyList

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
kylin-system-updater (1.3.2.1kord) v101; urgency=medium
* BUG: 无
* 需求号: 无
* 其他改动说明: 增加运行依赖python3-distro-info
* 其他改动影响域:系统更新插件
-- luoxueyi <luoxueyi@kylinos.cn> Fri, 24 Dec 2021 10:36:19 +0800
kylin-system-updater (1.3.2kord) v101; urgency=medium
* BUG: 无

1
debian/control vendored
View File

@ -53,6 +53,7 @@ Depends: ${python3:Depends},
python3-gi (>= 3.8),
python3-yaml,
aptdaemon,
python3-distro-info,
ukui-control-center (>= 3.1.1+1103)
Breaks:
Recommends: python3-launchpadlib