summaryrefslogtreecommitdiff
path: root/plugins/backend/zypppkgmgr.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/backend/zypppkgmgr.py')
-rw-r--r--plugins/backend/zypppkgmgr.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/backend/zypppkgmgr.py b/plugins/backend/zypppkgmgr.py
index afddfd7..950c1af 100644
--- a/plugins/backend/zypppkgmgr.py
+++ b/plugins/backend/zypppkgmgr.py
@@ -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: