[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py

skvidal at osuosl.org skvidal at osuosl.org
Tue Jun 29 14:23:30 UTC 2010


 yum/__init__.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 825f263c7e5853fbc3b515e5ce979738c04783bf
Merge: e24d48d... 1d3fada...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Jun 28 17:19:55 2010 -0400

    Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
    
    * 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
      l10n: Updated Russian (ru) translation to 98%

commit e24d48d173ef72e751ba0a96b2d652dba219cbe0
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Jun 28 17:18:55 2010 -0400

    add yum config and enabled repos as additional history info - stored per transaction

diff --git a/yum/__init__.py b/yum/__init__.py
index d6d467b..54f24f2 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1326,6 +1326,9 @@ class YumBase(depsolve.Depsolve):
                 cmdline = ' '.join(self.cmds)
             self.history.beg(rpmdbv, using_pkgs, list(self.tsInfo),
                              self.skipped_packages, rpmdb_problems, cmdline)
+            # write out our config and repo data to additional history info
+            self._store_config_in_history()
+            
             self.plugins.run('historybegin')
         #  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
@@ -4690,3 +4693,12 @@ class YumBase(depsolve.Depsolve):
             
         return True    
 
+    def _store_config_in_history(self):
+        myconf += self.conf.dump()
+        self.history.write_addon_data('activeconfig', myconf)
+        myrepos = ''
+        for repo in self.repos.listEnabled():
+            myrepos += repo.dump()
+            myrepos += '\n'
+        self.history.write_addon_data('enabled-repos', myrepos)
+        


More information about the Yum-commits mailing list