From c94e1fadecac61b2843a4e3924c9c229acd343e8 Mon Sep 17 00:00:00 2001 From: wanchao-xu Date: Mon, 26 Aug 2024 10:48:18 +0800 Subject: [PATCH] Remove the rpm cache which will be updated for image recreator. Change-Id: I05eb162d5a31ea4c3469ffcc526934e0d8c42e50 Signed-off-by: wanchao-xu --- plugins/backend/zypppkgmgr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/backend/zypppkgmgr.py b/plugins/backend/zypppkgmgr.py index ac64e05..50df6bf 100644 --- a/plugins/backend/zypppkgmgr.py +++ b/plugins/backend/zypppkgmgr.py @@ -522,11 +522,13 @@ class Zypp(BackendPlugin): todo = zypp.GetResolvablesToInsDel(self.Z.pool()) installed_pkgs = todo._toInstall dlpkgs = [] + update_only = False # re-create image with updating some packages if len(installed_pkgs) == 0: self.deleteUpdatedPkgs() installed_pkgs = self.update_pkgs + update_only = True for pitem in installed_pkgs: if not zypp.isKindPattern(pitem) and \ @@ -600,7 +602,7 @@ class Zypp(BackendPlugin): nocache = repo.nocache if repo else False if os.path.exists(local): - if nocache or self.checkPkg(local) !=0: + if nocache or self.checkPkg(local) !=0 or update_only: os.unlink(local) else: download_total_size -= int(po.downloadSize()) -- 2.34.1