Bug 1339116

Summary: [RFE] make yum autosave transactions configurable
Product: Red Hat Enterprise Linux 6 Reporter: Eva Mrakova <emrakova>
Component: yumAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED NEXTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 6.8CC: emrakova, james.antill, tharrrk, vmukhame
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1208803 Environment:
Last Closed: 2016-07-25 15:11:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
yum-3.4.3-125.el7.centos.noarch
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.