extras-buildsys/utils ExtrasPushUtils.py, NONE, 1.1 extras-repoview.py, 1.8, 1.9 extras-repobuild.py, 1.19, 1.20 extras-sign-move.py, 1.16, NONE

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Sun Aug 20 12:26:10 UTC 2006


Author: mschwendt

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

Modified Files:
	extras-repoview.py extras-repobuild.py 
Added Files:
	ExtrasPushUtils.py 
Removed Files:
	extras-sign-move.py 
Log Message:
- remove obsolete and out-of-date extras-sign-move.py
- move some common constants and function into ExtrasPushUtils module
- make extras-repo{build,view}.py use the new module



--- NEW FILE ExtrasPushUtils.py ---
#!/usr/bin/python -t
# -*- mode: Python; indent-tabs-mode: nil; -*-
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

import os, sys

distro = 'fedora'
project = 'extras'

treedir = '/srv/rpmbuild/%s/tree/%s' % (project, project)

archdict = {'3':['x86_64', 'i386'], 
            '4':['ppc','x86_64', 'i386'],
            '5':['ppc','x86_64', 'i386'],
            'development':['ppc','x86_64','i386'],
            }

DEBUG = False

def debugprint(msg):
    if DEBUG:
        print msg

def run_and_check(cmd):
    debugprint(cmd)
    if not DEBUG:
        result = os.system(cmd)
        if result != 0:
            print >> sys.stderr, 'Error running command: %s ' % cmd
            if result > 127:
                sys.exit(1)
            sys.exit(result)


Index: extras-repoview.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-repoview.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- extras-repoview.py	12 Jun 2006 12:18:24 -0000	1.8
+++ extras-repoview.py	20 Aug 2006 12:26:07 -0000	1.9
@@ -13,41 +13,17 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-import os
-import sys
+import os, sys
 import shutil
-import string
+
+sys.path.append('/srv/extras-push/work/extras-buildsys/utils')
+from ExtrasPushUtils import *
 
 # get the path to where to look for the packages to be signed
 # make repoview
 
-project = 'extras'
-treedir = '/srv/rpmbuild/%s/tree/%s' % (project, project)
-archdict = {'3':['x86_64', 'i386'], 
-            '4':['ppc','x86_64', 'i386'],
-            '5':['ppc','x86_64', 'i386'],
-            'development':['ppc','x86_64','i386'],
-            }
-
-
 DEBUG = False
 
-def debugprint(msg):
-    if DEBUG:
-        print msg
-        
-
-def run_and_check(cmd):
-    debugprint(cmd)
-    if not DEBUG:
-        result = os.system(cmd)
-        if result != 0:
-            print >> sys.stderr, 'Error running command: %s ' % cmd
-            if result > 127:
-                sys.exit(1)
-            sys.exit(result)
-
-
 def do_repoview(repodir):
     print 'Generating repoview in %s' % repodir
 #    cmd = '/usr/bin/repoview -q %s' % repodir


Index: extras-repobuild.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-repobuild.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- extras-repobuild.py	13 Jun 2006 09:29:02 -0000	1.19
+++ extras-repobuild.py	20 Aug 2006 12:26:07 -0000	1.20
@@ -13,11 +13,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-import os
-import sys
-import rpmUtils
+import os, sys
 import shutil
-import string
+
+sys.path.append('/srv/extras-push/work/extras-buildsys/utils')
+from ExtrasPushUtils import *
 
 # get the path to where to look for the packages to be signed
 # make repo
@@ -25,50 +25,25 @@
 # email to fedora-extras-list with the built packages list
 # sing, dance, romance
 
-distro = 'fedora'
-project = 'extras'
-treedir = '/srv/rpmbuild/%s/tree/%s' % (project, project)
 cachedir = '/tmp/repomd-cache'
 compsname = 'comps.xml'
-archdict = {'3':['x86_64', 'i386'], 
-            '4':['ppc','x86_64', 'i386'],
-            '5':['ppc','x86_64', 'i386'],
-            'development':['ppc','x86_64','i386'],
-            }
+
 # packages to exclude from being repomanaged: dist => shell quoted path regexp
 keepdict = {'3': "'/\([^/]\+-\)\?kmod-'",
             '4': "'/\([^/]\+-\)\?kmod-'",
             '5': "'/\([^/]\+-\)\?kmod-'",
             'development': "'/\([^/]\+-\)\?kmod-'",
             }
-ts = rpmUtils.transaction.initReadOnlyTransaction()
-
 
 DEBUG = False
 
-def debugprint(msg):
-    if DEBUG:
-        print msg
-        
-
-def run_and_check(cmd):
-    debugprint(cmd)
-    if not DEBUG:
-        result = os.system(cmd)
-        if result != 0:
-            print >> sys.stderr, 'Error running command: %s ' % cmd
-            if result > 127:
-                sys.exit(1)
-            sys.exit(result)
-
-
 def do_repo_stuff(repodir, keep=2, nomanage=None):
     compspath = os.path.join(repodir, compsname)
     rpdata = os.path.join(repodir, 'repodata')
     debugprint('removing tree %s' % rpdata)
 
-    if not DEBUG:        
-        if os.path.exists(rpdata): shutil.rmtree(rpdata)
+    if os.path.exists(rpdata) and not DEBUG:
+        shutil.rmtree(rpdata)
     
     print 'Processing: %s' % repodir
     print 'cleaning up older packages (keeping %d latest)' % (keep)


--- extras-sign-move.py DELETED ---




More information about the fedora-extras-commits mailing list