extras-buildsys/utils/pushscript Push.py,1.40,1.41

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun May 6 16:09:53 UTC 2007


Author: mschwendt

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

Modified Files:
	Push.py 
Log Message:
This ancient debug flag is a pita.


Index: Push.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/Push.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- Push.py	6 May 2007 16:00:52 -0000	1.40
+++ Push.py	6 May 2007 16:09:50 -0000	1.41
@@ -31,9 +31,6 @@
 from BuildSys import LocalPlague
 from BuildReport import *
 
-DEBUG = False
-Utils.setdebug(DEBUG)
-
 # Lockfile name supported by plague for mutual exclusion during
 # access to needsign repository (i.e. 'stagesdir').
 REPO_LOCKFILE_NAME = '.repo-update.lock'
@@ -43,7 +40,7 @@
     force = False
 
 ts = rpmUtils.transaction.initReadOnlyTransaction()
-# Further globals: cfg, srpmlocdict
+# Further globals: cfg
 
 # ====================================================================
 
@@ -52,13 +49,10 @@
     Needs access to the repository root directory where it
     examines the source rpm."""
     
-    global ts, srpmlocdict
+    global ts
     hdr = rpmUtils.miscutils.hdrFromPackage(ts,pkgpath)
     source_rpm = hdr['sourcerpm']
-    if not DEBUG:
-        srpmloc = os.path.join(reporoot, 'SRPMS', source_rpm)
-    else:  # in debug mode we cannot access signed/installed rpms
-        srpmloc = srpmlocdict[source_rpm]
+    srpmloc = os.path.join(reporoot, 'SRPMS', source_rpm)
     hdr = rpmUtils.miscutils.hdrFromPackage(ts,srpmloc)
     return hdr['excludearch']
 
@@ -69,8 +63,6 @@
     if numfiles < 1:
         print "No packages to sign"
         return 0
-    if DEBUG:
-        return 0
 
     while numfiles > 0:
         if numfiles > 256:
@@ -104,8 +96,6 @@
     except:
         print 'Rollback:', rollback
         for f in rollback:
-            if DEBUG:
-                break
             try:
                 os.remove(f)
             except:
@@ -131,8 +121,6 @@
     (n,a,e,v,r) = Utils.naevr(package)
     summary = Utils.get_pkg_header(package)['summary'].rstrip()
     pkg_fn = os.path.basename(package)
-    global srpmlocdict  # debug only
-    srpmlocdict[pkg_fn] = package  # debug only
     destloc = os.path.join(destroot, 'SRPMS', pkg_fn)
     if not os.path.exists(destloc):
         rollback.append(destloc)
@@ -201,7 +189,7 @@
     distdir = '%s-%s-%s' % (cfg.distro, dist, cfg.project)
     needsignroot = os.path.join(cfg.stagesdir, distdir)
     destroot = os.path.join(cfg.treedir, dist)
-    if not DEBUG and not os.path.exists(destroot):
+    if not os.path.exists(destroot):
         os.makedirs(destroot)
     
     # We check for changes already here in case the repo has changed
@@ -268,8 +256,6 @@
                     break
 
         print "Copying packages into repositories:"
-        global srpmlocdict
-        srpmlocdict = {} # debug only
         for br in results:
             name = br.GetName()
             clogdiff = WhatsNew.getclogdiff(dist,name,br.GetSourcePkg(),ts)
@@ -361,14 +347,13 @@
     msg['From'] = cfg.mail_from
     msg['To'] = cfg.mail_to
     Utils.debugprint( msg.as_string() )
-    if not DEBUG:
-        s = smtplib.SMTP()
-        if cfg.smtp_server:
-            s.connect(cfg.smtp_server)
-        else:
-            s.connect()
-        s.sendmail(cfg.mail_from, [cfg.mail_to], msg.as_string())
-        s.close()
+    s = smtplib.SMTP()
+    if cfg.smtp_server:
+        s.connect(cfg.smtp_server)
+    else:
+        s.connect()
+    s.sendmail(cfg.mail_from, [cfg.mail_to], msg.as_string())
+    s.close()
     
     # Build report has been mailed, we can delete the run-files.
     for dist in distlist:




More information about the fedora-extras-commits mailing list