[yum-git] repodiff.py

James Antill james at linux.duke.edu
Thu Sep 25 14:32:39 UTC 2008


 repodiff.py |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 1a9fc9de4ba1016478fce56e644f26c8727e632f
Author: James Antill <james at and.org>
Date:   Thu Sep 25 10:31:31 2008 -0400

    Delete any "old" repo. data in the repodiff repo. dirs.

diff --git a/repodiff.py b/repodiff.py
index 9ffdb33..eeb4eaf 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -20,6 +20,7 @@ import sys
 import time
 import os
 import locale
+import shutil
 
 from optparse import OptionParser
 
@@ -39,6 +40,12 @@ class DiffYum(yum.YumBase):
         repoid = repotype + str (len(self.dy_repos[repotype]) + 1)
         self.dy_repos[repotype].append(repoid)
      
+        #  The problem here is that we are arbitrarily changing the repos
+        # that are backed by the new1/old1 etc. repoids ... yum thinks they
+        # are the same repo. and thus. treats them accordingly.
+        shutil.rmtree("%s/%s" % (self.dy_basecachedir, repoid),
+                      ignore_errors=True)
+
         # make our new repo obj
         newrepo = yum.yumRepo.YumRepository(repoid)
         newrepo.name = repoid



More information about the Yum-commits mailing list