From 13430cf99a5e575687a09116c2609347cadf3916 Mon Sep 17 00:00:00 2001 From: wangsong Date: Fri, 14 Oct 2022 09:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E5=8C=85=E5=90=8D=E5=8D=95python=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E7=AE=97=E6=B3=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/SystemUpdater/backend/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/SystemUpdater/backend/__init__.py b/backend/SystemUpdater/backend/__init__.py index c7c7cbb..58d15e0 100644 --- a/backend/SystemUpdater/backend/__init__.py +++ b/backend/SystemUpdater/backend/__init__.py @@ -106,8 +106,10 @@ class UpdateEssentialItem(): def check_white(self,remove_pkgs): logging.info("Check: remove pkg in White Packages...") - for pkg in remove_pkgs: - if pkg in self.remove_white: + new_upgrade_list = list(set(remove_pkgs) & set(self.remove_white)) + + for pkg in new_upgrade_list: + if pkg in remove_pkgs: logging.info("%s will be remove in remove pkg...",pkg) remove_pkgs.remove(pkg)