extras-buildsys/utils/pushscript RepoPrune.py,1.2,1.3

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Jan 1 16:02:47 UTC 2007


Author: scop

Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7425

Modified Files:
	RepoPrune.py 
Log Message:
Don't choke on source rpms in binary package dirs.


Index: RepoPrune.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/RepoPrune.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RepoPrune.py	1 Jan 2007 16:00:46 -0000	1.2
+++ RepoPrune.py	1 Jan 2007 16:02:47 -0000	1.3
@@ -107,7 +107,13 @@
                 fullname = os.path.join(root,f)
                 hdr = rpmUtils.miscutils.hdrFromPackage(ts,fullname)
                 sourcerpm = hdr['sourcerpm']
+                if not sourcerpm:
+                    # At least source rpms in binary package dirs cause this.
+                    # TODO: maybe just remove them too?
+                    print 'WARNING: SRPM name N/A for %s, skipping' % f
+                    continue
                 if not sourcerpm.endswith('.rpm'):
+                    print 'WARNING: unusual SRPM name for %s (%s), skipping' % (f, sourcerpm)
                     continue
                 if not os.path.join(srcdir,sourcerpm) in srcfiles:
                     print '  Removing', f




More information about the scm-commits mailing list