extras-buildsys/utils extras-repoview.py, NONE, 1.1 extras-push, 1.1, 1.2 extras-repobuild.py, 1.9, 1.10 extras-sign-move.py, 1.5, 1.6

Ville Skytta (scop) fedora-extras-commits at redhat.com
Sat Jan 21 18:18:59 UTC 2006


Author: scop

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

Modified Files:
	extras-push extras-repobuild.py extras-sign-move.py 
Added Files:
	extras-repoview.py 
Log Message:
Sync with production.


--- NEW FILE extras-repoview.py ---
#!/usr/bin/python -t
# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

import os
import sys
import shutil
import string

# get the path to where to look for the packages to be signed
# make repoview

treedir = '/rpmbuild/extras/tree/extras'
archdict = {'3':['x86_64', 'i386'], 
            'development':['ppc','x86_64','i386'],
            '4':['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
            sys.exit(result)


def do_repoview(repodir):
    print 'Generating repoview'
    cmd = '/usr/bin/repoview %s' % repodir
    run_and_check(cmd)            

    # if there's a debug subdir, make that a repo, too.
    dbg_repodir = os.path.join(repodir, 'debug')

    if os.path.exists(dbg_repodir):
        cmd = '/usr/bin/repoview %s' % dbg_repodir
        run_and_check(cmd)                    


def main(dist):
    if not archdict.has_key(dist):
        print "No Distribution named %s found" % dist
        sys.exit(1)
    
    destdir = os.path.join(treedir, dist)

    print "Making Repoview pages"

    do_repoview(os.path.join(destdir, 'SRPMS'))

    # arch repo creation
    for arch in archdict[dist]:
        repodir = os.path.join(destdir, arch)
        do_repoview(repodir)

if __name__ == '__main__':
    me = os.getcwd()
    if len(sys.argv) < 2:
        print "Usage:\nextras-repoview.py release\n\n"
        sys.exit(1)
    main(sys.argv[1])
    os.chdir(me)
    


Index: extras-push
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-push,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- extras-push	17 Aug 2005 05:17:45 -0000	1.1
+++ extras-push	21 Jan 2006 18:18:51 -0000	1.2
@@ -5,5 +5,6 @@
    exit 1
 fi
 
-~/bin/extras-sign-move.py $1 && ~/bin/extras-repobuild.py $1
+~/bin/extras-sign-move.py $1 && ~/bin/extras-repobuild.py $1 && ~/bin/extras-repoview.py $1
+
 


Index: extras-repobuild.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-repobuild.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- extras-repobuild.py	25 Nov 2005 17:45:22 -0000	1.9
+++ extras-repobuild.py	21 Jan 2006 18:18:51 -0000	1.10
@@ -11,7 +11,7 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 import os
 import sys
@@ -70,10 +70,6 @@
         cmd = '/usr/bin/createrepo -c %s -q -x *debuginfo* %s' % (cachedir, repodir)
     
     run_and_check(cmd)            
-    
-    print 'Generating repoview'
-    cmd = '/usr/bin/repoview %s' % repodir
-    run_and_check(cmd)            
 
     # if there's a debug subdir, make that a repo, too.
     dbg_repodir = os.path.join(repodir, 'debug')
@@ -88,9 +84,6 @@
     
         cmd = '/usr/bin/createrepo -c %s -q %s' % (cachedir, dbg_repodir)
         run_and_check(cmd)            
-            
-        cmd = '/usr/bin/repoview %s' % dbg_repodir
-        run_and_check(cmd)                    
 
 
 def main(dist):
@@ -102,8 +95,7 @@
 
     print "Making Repository Metadata"
 
-    repodir = os.path.join(destdir, 'SRPMS')
-    do_repo_stuff(repodir)
+    do_repo_stuff(os.path.join(destdir, 'SRPMS'))
 
     # arch repo creation
     for arch in archdict[dist]:


Index: extras-sign-move.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/extras-sign-move.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- extras-sign-move.py	21 Jan 2006 17:33:43 -0000	1.5
+++ extras-sign-move.py	21 Jan 2006 18:18:51 -0000	1.6
@@ -11,7 +11,7 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 import os
 import sys
@@ -19,7 +19,6 @@
 import smtplib
 import shutil
 import string
-import tempfile
 from email.MIMEText import MIMEText
 
 
@@ -126,10 +125,7 @@
     s.connect()
     s.sendmail(mail_from, [mail_to], msg.as_string())
     s.close()
-    
-
-
-
+        
 def sign_pkgs(filelist):
     """gpg sign all the rpms"""
     numfiles = len(filelist)
@@ -166,8 +162,6 @@
       print ' %s' % os.path.basename(item)
 
     destdir = os.path.join(treedir, dist)
-    tmpdir = tempfile.mkdtemp(prefix=dist, dir='/var/tmp')
-    
     if not os.path.exists(destdir):
         for arch in archdict[dist]:
             if not DEBUG:
@@ -260,7 +254,7 @@
         if not DEBUG:
             os.unlink(file)
         
-    
+    # FIXME clean up empty dirs, too.
     
 if __name__ == '__main__':
     me = os.getcwd()




More information about the fedora-extras-commits mailing list