extras-buildsys/utils extras-push-new,1.45,1.46
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Sun Jul 16 20:51:06 UTC 2006
Author: scop
Update of /cvs/fedora/extras-buildsys/utils
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31837
Modified Files:
extras-push-new
Log Message:
Reset PUSHED flag if rpms newer than it have appeared in a build result dir.
Index: extras-push-new
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push-new,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- extras-push-new 16 Jul 2006 20:46:29 -0000 1.45
+++ extras-push-new 16 Jul 2006 20:51:03 -0000 1.46
@@ -224,6 +224,20 @@
if not os.path.isfile(flagname):
continue
mtime = os.path.getmtime(flagname)
+ # Check if there are *.rpm newer than the flag
+ changed = False
+ for root, dirs, files in os.walk(pkgrelroot):
+ if changed:
+ break
+ for f in fnmatch.filter(files, '*.rpm'):
+ if os.path.getmtime(os.path.join(root, f)) > mtime:
+ changed = True
+ break
+ if changed:
+ print 'New packages in PUSHED %s, clearing flag' % pkgrelroot
+ if not DEBUG:
+ os.remove(flagname)
+ continue
if ( time.time()-mtime > 3600*48 ):
print 'Removing old %s' % pkgrelroot
if not DEBUG:
More information about the scm-commits
mailing list