extras-buildsys/utils extras-push-new,1.20,1.21

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri Jun 2 22:04:28 UTC 2006


Author: mschwendt

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

Modified Files:
	extras-push-new 
Log Message:
drop old error return value cruft taken over from old scripts


Index: extras-push-new
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push-new,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- extras-push-new	2 Jun 2006 22:02:27 -0000	1.20
+++ extras-push-new	2 Jun 2006 22:04:26 -0000	1.21
@@ -284,7 +284,7 @@
     numfiles = len(filelist)
     if numfiles < 1:
         print "No packages to sign"
-        return False
+        return errno.EINVAL
 
     while numfiles > 0:
         if numfiles > 256:
@@ -297,19 +297,19 @@
         foo = string.join(files)
         result = os.system('echo %s | xargs rpm --resign' % foo)
         if result != 0:
-            return False
+            return result
         numfiles = len(filelist)
 
-    return True
+    return 0
 
     
 def sign_move(dist):
     runfilename = getrunfilename(dist)
     try:
         rundirfile = open(runfilename,'a')
-    except:
-        print 'ERROR: Could not write to %s' % runfilename
-        return 11
+    except IOError, (errno, strerr):
+        print 'ERROR: %s: %s' % (strerr,runfilename)
+        sys.exit(errno)
 
     distdir = '%s-%s-%s' % (distro, dist, project)
     needsign = os.path.join(stagesdir, distdir)
@@ -330,15 +330,15 @@
 
     rpms = files['rpm'] + files['srpm'] + files['debuginfo']
     if len(rpms) == 0:
-        print 'nothing to sign'
-        return(4)
+        print '%s: nothing to sign' % dist
+        return 0
 
     print "Signing Packages:"
     if not DEBUG:
         result = sign_pkgs(rpms)
-        if not result:
+        if result:
             print "Error signing packages"
-            return(2)
+            return result
 
     print "Moving Packages into Place"
 
@@ -535,7 +535,7 @@
 
     for dist in diststopush:
         result = sign_move(dist)
-        if result and result != 4: # 4 = no packages to sign
+        if result:
             sys.exit(result)
 
     # Option -f re-runs repobuild/repoview for all dists, even if




More information about the fedora-extras-commits mailing list