extras-buildsys/utils/pushscript RepoPrune.py,1.4,1.5
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Mon Oct 29 12:18:04 UTC 2007
Author: mschwendt
Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15313
Modified Files:
RepoPrune.py
Log Message:
Enhance RepoPrune configuration option, 'keep' value can be customised per dist repo.
Index: RepoPrune.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/RepoPrune.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RepoPrune.py 23 Aug 2007 12:02:03 -0000 1.4
+++ RepoPrune.py 29 Oct 2007 12:18:01 -0000 1.5
@@ -128,12 +128,17 @@
assert rpmUtils.miscutils.compareEVR((0,1,2),(0,1,2)) == 0
assert rpmUtils.miscutils.compareEVR((1,2,3),(4,0,99)) < 0
- keep = (dist == 'development') and 1 or 2
- if not cfg.repoprune_keepdict.has_key(dist):
+ if not hasattr(cfg,'repoprune_keepdict') or not cfg.repoprune_keepdict.has_key(dist):
print 'WARNING: repoprune_keepdict undefined for %s' % dist
return False
- whitelist = cfg.repoprune_keepdict[dist]
-
+ keepdict = cfg.repoprune_keepdict[dist]
+ if isinstance(keepdict,dict):
+ keep = keepdict['keep']
+ whitelist = keepdict['whitelist']
+ else: # old style cfg where we cannot customise the 'keep' value
+ keep = (dist == 'development') and 1 or 2
+ whitelist = keepdict
+
srcdir = os.path.join(cfg.treedir,dist,'SRPMS')
bindirs = []
for arch in cfg.archdict[dist]: # list of repo archs
More information about the fedora-extras-commits
mailing list