extras-buildsys/utils extras-push-new,1.32,1.33

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sat Jun 10 20:37:21 UTC 2006


Author: mschwendt

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

Modified Files:
	extras-push-new 
Log Message:
- implement ExcludeArch check for noarch packages: still disabled
- fix one exit rc to errno



Index: extras-push-new
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push-new,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- extras-push-new	10 Jun 2006 19:43:19 -0000	1.32
+++ extras-push-new	10 Jun 2006 20:37:18 -0000	1.33
@@ -62,6 +62,7 @@
     doublesync = False
     force = False
     hardlink = False
+    excludearch_for_noarch = False
 
 alldists = [ '5', '4', '3', 'development' ] # also the order in build reports
 
@@ -496,8 +497,17 @@
         (n,a,e,v,r) = naevr(package)
 
         if a == 'noarch':
+            if opts.excludearch_for_noarch:
+                hdr = rpmUtils.miscutils.hdrFromPackage(ts,package)
+                source_rpm = hdr['sourcerpm']
+                srpmloc = os.path.join(destdir, 'SRPMS', source_rpm)
+                hdr = rpmUtils.miscutils.hdrFromPackage(ts,srpmloc)
+                excludearch = hdr['excludearch']
             linkloc = None
             for arch in archdict[dist]:
+                if opts.excludearch_for_noarch and arch in excludearch:
+                        print 'EXCLUDEARCH: Not releasing %s for %s.' % (pkg_fn,arch)
+                        continue
                 if package in files['debuginfo']:
                     arch = '%s/debug' % arch
                 destloc = os.path.join(destdir, arch, pkg_fn)
@@ -651,7 +661,7 @@
             continue
         if d not in alldists:
             print "ERROR: No Distribution named '%s' found" % d
-            sys.exit(1)
+            sys.exit(errno.EINVAL)
         if d not in diststopush:
             diststopush.append(d)
     debugprint(diststopush)




More information about the fedora-extras-commits mailing list