[Yum] skip "Running Transaction Test"

Markus Hetzenecker markus.hetzenecker at uibk.ac.at
Wed Jul 27 14:13:35 UTC 2005


hey,

It would be nice to have the possibility to minimize the updateting time, like skipping Transaction Test.
with a config option in yum.conf like "skiptest=0|1", with default 0.

I did it in this file:
--- yum-2.2.1/cli.py.orig       2005-03-15 08:19:11.000000000 +0100
+++ yum-2.2.1/cli.py    2005-07-26 11:03:04.000000000 +0200
@@ -657,30 +657,33 @@
         if self.gpgsigcheck(downloadpkgs) != 0:
             return

-        self.log(2, 'Running Transaction Test')
-        tsConf = {}
-        for feature in ['diskspacecheck']: # more to come, I'm sure
-            tsConf[feature] = self.conf.getConfigOption(feature)
..........
-                errstring += '  %s\n' % descr
-
-            raise yum.Errors.YumBaseError, errstring
-        self.log(2, 'Transaction Test Succeeded')
-        del self.ts
+        if not self.conf.getConfigOption('skiptest'):
+            self.log(2, 'Running Transaction Test')
+            tsConf = {}
........
+                    errstring += '  %s\n' % descr
+
+                raise yum.Errors.YumBaseError, errstring
+            self.log(2, 'Transaction Test Succeeded')
+            del self.ts
+        else:
+            self.log(2, 'Transaction Test skipped')

         self.initActionTs() # make a new, blank ts to populate
         self.populateTs(keepold=0) # populate the ts

and in yum-2.2.1/yum/config.py included a line at 228
+                       ('skiptest', 0),


thanxs a lot, markus.
-- 
fork() off;
LinuxBetreuung Uni Ibk, fon: 507-2369
GnuPG key: http://www.uibk.ac.at/~c102130/public_key.asc



More information about the Yum mailing list