|
|
eb5f31 |
commit 8d5248c4ab3e8efab00537da8f35a77b86f3c333
|
|
|
eb5f31 |
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
|
|
|
eb5f31 |
Date: Fri May 6 11:30:56 2016 +0200
|
|
|
eb5f31 |
|
|
|
eb5f31 |
Add autosavets option allowing to avoid autosaving transactions. BZ 1208803
|
|
|
eb5f31 |
|
|
|
eb5f31 |
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
|
|
|
eb5f31 |
index efc6765..4d53c8e 100644
|
|
|
eb5f31 |
--- a/docs/yum.conf.5
|
|
|
eb5f31 |
+++ b/docs/yum.conf.5
|
|
|
eb5f31 |
@@ -897,6 +897,12 @@ Note that if loadts_ignorerpm is True, this option does nothing.
|
|
|
eb5f31 |
Boolean (1, 0, True, False, yes, no) Defaults to False
|
|
|
eb5f31 |
|
|
|
eb5f31 |
.IP
|
|
|
eb5f31 |
+\fBautosavets\fR
|
|
|
eb5f31 |
+Should yum automatically save a transaction to a file when the transaction is
|
|
|
eb5f31 |
+solved but not run.
|
|
|
eb5f31 |
+Boolean (1, 0, True, False, yes, no) Defaults to True
|
|
|
eb5f31 |
+
|
|
|
eb5f31 |
+.IP
|
|
|
eb5f31 |
\fBfssnap_automatic_pre\fR
|
|
|
eb5f31 |
Should yum try to automatically create a snapshot before it runs a transaction.
|
|
|
eb5f31 |
Boolean (1, 0, True, False, yes, no) Defaults to False
|
|
|
eb5f31 |
diff --git a/yum/__init__.py b/yum/__init__.py
|
|
|
eb5f31 |
index c896fff..764e97d 100644
|
|
|
eb5f31 |
--- a/yum/__init__.py
|
|
|
eb5f31 |
+++ b/yum/__init__.py
|
|
|
eb5f31 |
@@ -1355,7 +1355,8 @@ much more problems).
|
|
|
eb5f31 |
self._depsolving_failed = False
|
|
|
eb5f31 |
|
|
|
eb5f31 |
if rescode == 2:
|
|
|
eb5f31 |
- self.save_ts(auto=True)
|
|
|
eb5f31 |
+ if self.conf.autosavets:
|
|
|
eb5f31 |
+ self.save_ts(auto=True)
|
|
|
eb5f31 |
|
|
|
eb5f31 |
# Make sure we don't fail in rpm if we're installing a package that is
|
|
|
eb5f31 |
# allowed multiple installs but has a newer version already installed.
|
|
|
eb5f31 |
diff --git a/yum/config.py b/yum/config.py
|
|
|
eb5f31 |
index 84be564..cae914d 100644
|
|
|
eb5f31 |
--- a/yum/config.py
|
|
|
eb5f31 |
+++ b/yum/config.py
|
|
|
eb5f31 |
@@ -893,6 +893,7 @@ class YumConf(StartupConf):
|
|
|
eb5f31 |
loadts_ignoremissing = BoolOption(False)
|
|
|
eb5f31 |
loadts_ignorerpm = BoolOption(False)
|
|
|
eb5f31 |
loadts_ignorenewrpm = BoolOption(False)
|
|
|
eb5f31 |
+ autosavets = BoolOption(True)
|
|
|
eb5f31 |
|
|
|
eb5f31 |
clean_requirements_on_remove = BoolOption(False)
|
|
|
eb5f31 |
|
|
|
eb5f31 |
diff -up yum-3.4.3/test/testbase.py.old yum-3.4.3/test/testbase.py
|
|
|
eb5f31 |
--- yum-3.4.3/test/testbase.py.old 2016-05-10 16:58:02.812286775 +0200
|
|
|
eb5f31 |
+++ yum-3.4.3/test/testbase.py 2016-05-10 16:58:43.590544423 +0200
|
|
|
eb5f31 |
@@ -69,6 +69,7 @@ class FakeConf(object):
|
|
|
eb5f31 |
self.diskspacecheck = True
|
|
|
eb5f31 |
self.depsolve_loop_limit = 10
|
|
|
eb5f31 |
self.override_install_langs = ''
|
|
|
eb5f31 |
+ self.autosavets = True
|
|
|
eb5f31 |
|
|
|
eb5f31 |
class FakeSack:
|
|
|
eb5f31 |
""" Fake PackageSack to use with FakeRepository"""
|