[yum-commits] repodiff.py repoquery.py
James Antill
james at osuosl.org
Wed Oct 22 05:48:45 UTC 2008
repodiff.py | 8 +-------
repoquery.py | 1 +
2 files changed, 2 insertions(+), 7 deletions(-)
New commits:
commit f5d89044ceaece50e0499e3319f735246fabfdc3
Author: James Antill <james at and.org>
Date: Wed Oct 22 01:48:39 2008 -0400
Use the new timestamp_check repo option for the repoids that need it
diff --git a/repodiff.py b/repodiff.py
index a1cd793..a5563f4 100755
--- a/repodiff.py
+++ b/repodiff.py
@@ -20,7 +20,6 @@ import sys
import time
import os
import locale
-import shutil
from yum.misc import to_unicode
from optparse import OptionParser
@@ -41,18 +40,13 @@ 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
newrepo.baseurl = [baseurl]
newrepo.basecachedir = self.dy_basecachedir
newrepo.metadata_expire = 0
+ newrepo.timestamp_check = False
# add our new repo
self.repos.add(newrepo)
# enable that repo
diff --git a/repoquery.py b/repoquery.py
index 440b513..33c729f 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -769,6 +769,7 @@ def main(args):
newrepo.baseurl = baseurl
newrepo.basecachedir = repoq.conf.cachedir
newrepo.metadata_expire = 0
+ newrepo.timestamp_check = False
repoq.repos.add(newrepo)
repoq.repos.enableRepo(newrepo.id)
repoq.logger.info( "Added %s repo from %s" % (repoid,repopath))
More information about the Yum-commits
mailing list