extras-buildsys/utils extras-push-new,1.12,1.13

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Fri May 19 11:23:04 UTC 2006


Author: mschwendt

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

Modified Files:
	extras-push-new 
Log Message:
- turn off DEBUG
- use errno at least in some places
- remove the extras-sign-move.py alias feature, since repobuild
  kills repoview (with the currently used createrepo)



Index: extras-push-new
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push-new,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- extras-push-new	19 May 2006 00:20:57 -0000	1.12
+++ extras-push-new	19 May 2006 11:23:01 -0000	1.13
@@ -15,13 +15,14 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
+import errno
 import fcntl, fnmatch
 import os, sys
 import rpmUtils
 import shutil
 import string
 
-DEBUG = True
+DEBUG = False
 
 signersgid = 100581  # extras_signers group
 
@@ -33,8 +34,8 @@
 # Where we store mails to be sent, lockfiles.
 rundir = '/srv/rpmbuild/extras-push-rundir'
 
-cachedir = '/tmp/repomd-cache'
-compsname = 'comps.xml'
+cachedir = '/tmp/repomd-cache' # UNUSED: copied from extras-sign-move.py
+compsname = 'comps.xml'  # UNUSED: copied from extras-sign-move.py
 
 project_hr = 'Fedora Extras'
 mail_from = 'buildsys at fedoraproject.org'
@@ -42,7 +43,7 @@
 mail_footer = """
 
 For more information about the built packages please see the repository
-or the fedora Info Feed: http://fedoraproject.org/infofeed/
+or the Fedora Info Feed: http://fedoraproject.org/infofeed/
 
 """
 smtp_server = ''
@@ -117,7 +118,7 @@
             self.rc = fcntl.flock(self.file, fcntl.LOCK_EX | fcntl.LOCK_NB)
         except IOError:
             print 'ERROR: script locked via lockfile %s - it seems to be running already' % self.name
-            sys.exit(11)
+            sys.exit(errno.EAGAIN)
 
 
     def unlock(self):
@@ -148,7 +149,7 @@
 
 def emptyrunfile(dist):
     runfilename = getrunfilename(dist)
-    if not os.path.isfile(runfilename):
+    if not os.path.exists(runfilename):
         return
     try:
         os.remove(runfilename)
@@ -484,12 +485,12 @@
     if opts.gidcheck:
         if os.getgid() != signersgid:
             print 'ERROR: Change into extras_signers group before running this!  Use "newgrp extras_signers".'
-            sys.exit(13)
+            sys.exit(errno.EPERM)
 
     if opts.signkeycheck:
         if 'extras at fedoraproject.org' != os.popen('rpm --eval %_gpg_name','r').read().rstrip():
             print 'ERROR: Configure ~/.rpmmacros for proper GPG signing before running this!'
-            sys.exit(13)
+            sys.exit(errno.EPERM)
 
     if opts.setumask:
         os.umask(0002)
@@ -500,7 +501,7 @@
     
     if len(sys.argv) < 2:
         print 'SYNTAX: %s <dist|all> [dist]...' % sys.argv[0]
-        sys.exit(22)
+        sys.exit(errno.EINVAL)
     
     dists = []  # the list of distribution release we want to push
     for d in sys.argv[1:]:
@@ -514,11 +515,6 @@
             dists.append(d)
     debugprint(dists)
 
-    # If we are called as 'extras-sign-move.py' we simulate old
-    # behaviour and only do: sign, move, repobuild, sync
-    if sys.argv[0].endswith('extras-sign-move.py'):
-        opts.repoview = False
-
     if not os.path.exists(rundir):
         os.makedirs(rundir)
     




More information about the fedora-extras-commits mailing list