[Yum-devel] [PATCH] Only do any rpmdbv checks, if history_record is set
James Antill
james at and.org
Wed May 5 20:48:56 UTC 2010
---
yum/__init__.py | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 550e5cc..6c070b0 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1257,19 +1257,19 @@ class YumBase(depsolve.Depsolve):
self.run_with_package_names.add('yum-metadata-parser')
break
- using_pkgs_pats = list(self.run_with_package_names)
- using_pkgs = self.rpmdb.returnPackages(patterns=using_pkgs_pats)
- rpmdbv = self.rpmdb.simpleVersion(main_only=True)[0]
- lastdbv = self.history.last()
- if lastdbv is not None:
- lastdbv = lastdbv.end_rpmdbversion
- if lastdbv is None or rpmdbv != lastdbv:
- txmbrs = self.tsInfo.getMembersWithState(None, TS_REMOVE_STATES)
- ignore_pkgs = [txmbr.po for txmbr in txmbrs]
- self._rpmdb_warn_checks(warn=lastdbv is not None,
- ignore_pkgs=ignore_pkgs)
if self.conf.history_record:
- self.history.beg(rpmdbv, using_pkgs, list(self.tsInfo))
+ using_pkgs_pats = list(self.run_with_package_names)
+ using_pkgs = self.rpmdb.returnPackages(patterns=using_pkgs_pats)
+ rpmdbv = self.rpmdb.simpleVersion(main_only=True)[0]
+ lastdbv = self.history.last()
+ if lastdbv is not None:
+ lastdbv = lastdbv.end_rpmdbversion
+ if lastdbv is None or rpmdbv != lastdbv:
+ txmbrs = self.tsInfo.getMembersWithState(None, TS_REMOVE_STATES)
+ ignore_pkgs = [txmbr.po for txmbr in txmbrs]
+ self._rpmdb_warn_checks(warn=lastdbv is not None,
+ ignore_pkgs=ignore_pkgs)
+ self.history.beg(rpmdbv, using_pkgs, list(self.tsInfo))
# Just before we update the transaction, update what we think the
# rpmdb will look like. This needs to be done before the run, so that if
--
1.7.0.1
More information about the Yum-devel
mailing list