Bug 1339116 - [RFE] make yum autosave transactions configurable
Summary: [RFE] make yum autosave transactions configurable
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.8
Hardware: Unspecified
OS: Linux
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-24 08:09 UTC by Eva Mrakova
Modified: 2016-07-25 15:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1208803
Last Closed: 2016-07-25 15:11:14 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Eva Mrakova 2016-05-24 08:09:11 UTC
Also happens for yum-3.2.29-73.el6

+++ This bug was initially created as a clone of Bug #1208803 +++

Description of problem:
First seen this auto-save-transaction "feature" in CentOS7 (yum-3.4.3-125)
I hate it from the first moment. This should be configurable.
Found this https://bugzilla.redhat.com/show_bug.cgi?id=684369 as CLOSED NOTABUG. So let it be a feature request.

Version-Release number of selected component (if applicable):
CentOS Linux release 7.1.1503 (Core)

How reproducible:
Every time.

Steps to Reproduce:
1. Run as root 'yum install <any_package>'
2. Answer "N" to "Is this ok?' question

Actual results:
Yum creates file /tmp/yum_save_tx*.yumtx

Expected results:
Should be configurable.
i.e. after setting 'autosavets = 0' in /etc/yum/yum.conf no file should be created.

Additional info:

diff -Nurp /usr/lib/python2.7/site-packages/yum.orig/config.py /usr/lib/python2.7/site-packages/yum/config.py
--- /usr/lib/python2.7/site-packages/yum.orig/config.py 2015-03-09 21:39:15.000000000 +0100
+++ /usr/lib/python2.7/site-packages/yum/config.py      2015-04-03 10:15:20.224220449 +0200
@@ -876,6 +876,7 @@ class YumConf(StartupConf):
     loadts_ignoremissing = BoolOption(False)
     loadts_ignorerpm = BoolOption(False)
     loadts_ignorenewrpm = BoolOption(False)
+    autosavets = BoolOption(True)
     clean_requirements_on_remove = BoolOption(False)
diff -Nurp /usr/lib/python2.7/site-packages/yum.orig/__init__.py /usr/lib/python2.7/site-packages/yum/__init__.py
--- /usr/lib/python2.7/site-packages/yum.orig/__init__.py       2015-03-09 21:39:15.000000000 +0100
+++ /usr/lib/python2.7/site-packages/yum/__init__.py    2015-04-03 10:32:45.885187304 +0200
@@ -1355,7 +1355,8 @@ much more problems).
             self._depsolving_failed = False
         if rescode == 2:
-            self.save_ts(auto=True)
+            if self.conf.autosavets != False:
+                self.save_ts(auto=True)
         self.verbose_logger.debug('Depsolve time: %0.3f' % (time.time() - ds_st))
         return rescode, restring

Comment 1 Valentina Mukhamedzhanova 2016-07-25 15:11:14 UTC
Red Hat Enterprise Linux version 6 is entering the Production 2 phase of its lifetime and this bug doesn't meet the criteria for it, i.e. only high severity issues will be fixed. Please see https://access.redhat.com/support/policy/updates/errata/ for further information.

Note You need to log in before you can comment on or make changes to this bug.