Upgrade mic version to 0.28.19 from 'tools/mic' project 60/312760/2 accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan accepted/tizen/unified/20240614.085211 accepted/tizen/unified/dev/20240620.010927 accepted/tizen/unified/toolchain/20240624.121607 accepted/tizen/unified/x/20240614.160502 accepted/tizen/unified/x/asan/20240625.092728 upstream/0.28.19
authorwangbiao <biao716.wang@samsung.com>
Fri, 14 Jun 2024 02:33:31 +0000 (11:33 +0900)
committerwangbiao <biao716.wang@samsung.com>
Fri, 14 Jun 2024 02:34:57 +0000 (11:34 +0900)
This is requested by VD
Mainly apply this patch: https://review.tizen.org/gerrit/#/c/tools/mic/+/291263/
Change-Id: Ibcc46d27bf89c86b10a2540af284e64681e84c6c
Signed-off-by: wangbiao <biao716.wang@samsung.com>
mic/__init__.py
packaging/mic.spec
plugins/backend/zypppkgmgr.py

index 723746b..a60b9b1 100755 (executable)
@@ -16,7 +16,7 @@
 
 import os, sys
 
-__version__ = "0.28.17"
+__version__ = "0.28.19"
 
 cur_path = os.path.dirname(__file__) or '.'
 sys.path.insert(0, cur_path + '/3rdparty')
index 2032f45..4b4214e 100755 (executable)
@@ -9,7 +9,7 @@
 
 Name:       mic
 Summary:    Image Creator for Linux Distributions
-Version:    0.28.17
+Version:    0.28.19
 Release:    0
 Group:      Development/Tools
 License:    GPLv2
index afddfd7..950c1af 100644 (file)
@@ -72,6 +72,7 @@ class Zypp(BackendPlugin):
         self.Z = None
         self.ts = None
         self.ts_pre = None
+        self.pkgs_bak = []
         self.incpkgs = {}
         self.excpkgs = {}
         self.pre_pkgs = []
@@ -99,7 +100,9 @@ class Zypp(BackendPlugin):
 
         if self.ts_pre:
             self.ts_pre.closeDB()
-            self.ts = None
+            self.ts_pre = None
+
+        self.pkgs_bak = []
 
         self.closeRpmDB()
 
@@ -896,13 +899,17 @@ class Zypp(BackendPlugin):
                 msger.verbose("pre-install package added: %s" % pkgname)
                 self.ts_pre.addInstall(h, rpmpath, 'u')
 
-            self.ts.addInstall(h, rpmpath, 'u')
+            #for rpm4.14 vesion, need to split addInstall for these two transactionSet.
+            #addInstall for self.ts should be after self.ts_pre done.
+            self.pkgs_bak.append({"header": h, "rpmpath": rpmpath})
 
         unresolved_dependencies = self.ts.check()
         if not unresolved_dependencies:
             if self.pre_pkgs:
                 self.preinstallPkgs()
 
+            for pkg_bak in self.pkgs_bak:
+                self.ts.addInstall(pkg_bak["header"], pkg_bak["rpmpath"], 'u')
             self.ts.order()
             cb = rpmmisc.RPMInstallCallback(self.ts)
             installlogfile = "%s/__catched_stderr.buf" % (self.instroot)
@@ -915,6 +922,7 @@ class Zypp(BackendPlugin):
             msger.disable_logstderr()
             self.ts.closeDB()
             self.ts = None
+            self.pkgs_bak = []
 
             if errors is not None:
                 if len(errors) == 0: