修改全盘更新不需要进行源过滤
This commit is contained in:
parent
bd59aba2c8
commit
c34ca8e878
|
@ -70,7 +70,7 @@ class InstallBackend():
|
|||
#拿到升级列表
|
||||
self.now_upgrade.upgrade_groups,self.now_upgrade.single_pkgs = self._make_groups_list(self.upgrade_data,_upgrade_mode,partial_upgrade_list)
|
||||
|
||||
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache)
|
||||
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache,_upgrade_mode)
|
||||
|
||||
logging.info("INSTALL install:%d , upgrade:%d remove:%d",len(pkgs_install),len(pkgs_upgrade),len(pkgs_remove))
|
||||
|
||||
|
@ -107,7 +107,7 @@ class InstallBackend():
|
|||
pkgs_install,pkgs_upgrade = self._make_pkgs_list(self.cache,self.upgrade_data.upgrade_groups_pkgs,self.now_upgrade.upgrade_groups,self.now_upgrade.single_pkgs)
|
||||
#计算解决依赖关系
|
||||
_success,delete_pkgs,delete_desc,header,desc = self._make_problem_resolver(pkgs_install,pkgs_upgrade)
|
||||
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache)
|
||||
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache,_upgrade_mode)
|
||||
pkgs_remove = delete_pkgs
|
||||
else:
|
||||
# 使用全盘升级 全盘使用dist-upgrade
|
||||
|
@ -115,7 +115,7 @@ class InstallBackend():
|
|||
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)
|
||||
pkgs_install,pkgs_upgrade,pkgs_remove = self._get_mark_from_cache(self.cache,_upgrade_mode)
|
||||
except Exception as e:
|
||||
_success = False
|
||||
desc = str(e)
|
||||
|
@ -185,12 +185,18 @@ class InstallBackend():
|
|||
raise NotImplementedError
|
||||
|
||||
#从cache中拿到标记的列表
|
||||
def _get_mark_from_cache(self,cache):
|
||||
def _get_mark_from_cache(self,cache,upgrade_mode):
|
||||
pkgs_install = []
|
||||
pkgs_upgrade = []
|
||||
pkgs_remove = []
|
||||
#获取调整包列表 去掉版本号
|
||||
adjust_pkgs = [i.split("=")[0] for i in self.upgrade_data.adjust_pkgs]
|
||||
|
||||
#全盘升级不做任何的调整 修复bug,出现调整版本,报错不需要更新升级退出
|
||||
if upgrade_mode == MODE_UPGRADE_SYSTEM:
|
||||
adjust_pkgs = []
|
||||
else:
|
||||
#获取调整包列表 去掉版本号
|
||||
adjust_pkgs = [i.split("=")[0] for i in self.upgrade_data.adjust_pkgs]
|
||||
|
||||
for pkg in cache:
|
||||
try:
|
||||
if pkg.marked_install:
|
||||
|
|
Loading…
Reference in New Issue