extras-buildsys/utils/pushscript RepoBuild.py, 1.3, 1.4 MultiLib.py, 1.11, 1.12 RCNeedsign.py, 1.2, 1.3 Utils.py, 1.15, 1.16
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Thu Mar 8 12:02:21 UTC 2007
Author: mschwendt
Update of /cvs/fedora/extras-buildsys/utils/pushscript
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18820
Modified Files:
RepoBuild.py MultiLib.py RCNeedsign.py Utils.py
Log Message:
At least make it possible to specify /usr/bin/createrepo and any
hardcoded options per "dist". Opens the door for the new createrepo
we want to use for the devel tree only.
Index: RepoBuild.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/RepoBuild.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RepoBuild.py 24 Oct 2006 20:28:19 -0000 1.3
+++ RepoBuild.py 8 Mar 2007 12:02:18 -0000 1.4
@@ -25,7 +25,7 @@
reporoot = os.path.join(cfg.treedir, dist)
repodir = os.path.join(reporoot,'SRPMS')
- Utils.create_repository(cfg,repodir,debuginfo=False) # source rpms
+ Utils.create_repository(cfg,dist,repodir,debuginfo=False) # source rpms
# get rid of symlinks that are in the way (of createrepo)
for link in cfg.repobuild_linkdict.get(dist) or []:
@@ -34,7 +34,7 @@
os.unlink(flink)
for arch in cfg.archdict[dist]:
- Utils.create_repository(cfg,os.path.join(reporoot,arch)) # binary+debuginfo rpms
+ Utils.create_repository(cfg,dist,os.path.join(reporoot,arch)) # binary+debuginfo rpms
# recreate symlinks
for link in cfg.repobuild_linkdict.get(dist) or []:
Index: MultiLib.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/MultiLib.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MultiLib.py 20 Feb 2007 12:36:23 -0000 1.11
+++ MultiLib.py 8 Mar 2007 12:02:18 -0000 1.12
@@ -312,7 +312,7 @@
for arch in cfg.archdict[dist]: # list of repo archs
changedagain = resolveMissing(cfg,dist,arch)
if changedagain:
- Utils.create_repository(cfg,os.path.join(cfg.treedir,dist,arch))
+ Utils.create_repository(cfg,dist,os.path.join(cfg.treedir,dist,arch))
if __name__ == '__main__':
Index: RCNeedsign.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/RCNeedsign.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RCNeedsign.py 1 Mar 2007 00:04:21 -0000 1.2
+++ RCNeedsign.py 8 Mar 2007 12:02:18 -0000 1.3
@@ -74,7 +74,7 @@
for br in results:
Push.push(br,dist,tmprepo,False)
for arch in cfg.archdict[dist]:
- Utils.create_repository(cfg,os.path.join(tmprepo,arch),False)
+ Utils.create_repository(cfg,dist,os.path.join(tmprepo,arch),False)
except: # everything is fatal
print 'ERROR: Creating temporary working copy failed.'
shutil.rmtree(tmpdir)
Index: Utils.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/utils/pushscript/Utils.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Utils.py 4 Mar 2007 01:11:36 -0000 1.15
+++ Utils.py 8 Mar 2007 12:02:18 -0000 1.16
@@ -126,16 +126,18 @@
install_copy(src,dest)
-def _create_repository(cfg,repodir,debuginfo=True):
+def _create_repository(cfg,dist,repodir,debuginfo=True):
print 'Creating repository %s' % repodir
- compsarg = ''
+ cmd = cfg.createrepo
+ if hasattr(cfg,'createrepo_dict'):
+ cmd = cfg.createrepo_dict.get(dist,cmd)
if os.path.exists( os.path.join(repodir,compsname) ):
- compsarg = '-g %s ' % compsname
- excludearg = ''
+ cmd += ' -g %s' % compsname
if debuginfo and os.path.exists( os.path.join(repodir,'debug') ):
- excludearg = "-x \'*debuginfo*\'"
- cmd = '%s -c %s -q %s %s %s' % (cfg.createrepo, cfg.cr_cachedir, compsarg, excludearg, repodir)
+ cmd += " -x \'*debuginfo*\'"
+ cmd += ' -c %s' % cfg.cr_cachedir
+ cmd += ' %s' % repodir
if run(cmd):
raise Exception
@@ -153,7 +155,7 @@
shutil.move(sourcefile,targetfile)
-def _backup_create_repository(cfg,repodir,debuginfo):
+def _backup_create_repository(cfg,dist,repodir,debuginfo):
# Create dirs, if missing, so we would create empty backups, too.
rpdata = os.path.join(repodir,'repodata')
for d in [repodir,rpdata]:
@@ -175,7 +177,7 @@
targetfile = os.path.join(tmpdir,f)
shutil.move(sourcefile,targetfile)
- _create_repository(cfg,repodir,debuginfo)
+ _create_repository(cfg,dist,repodir,debuginfo)
_restore_repodata_dir(tmpdir,rpdata)
shutil.rmtree(tmpdir)
@@ -186,16 +188,16 @@
sys.exit(errno.EPERM)
-def create_repository(cfg,repodir,debuginfo=True):
+def create_repository(cfg,dist,repodir,debuginfo=True):
"""create/update repository metadata for a given directory and
consider a 'debug' sub-repository by default"""
- _backup_create_repository(cfg,repodir,debuginfo)
+ _backup_create_repository(cfg,dist,repodir,debuginfo)
dbg_repodir = os.path.join(repodir, 'debug')
# If there's a debug subdir, make that a repo, too.
if debuginfo and os.path.exists(dbg_repodir):
- _backup_create_repository(cfg,dbg_repodir,False)
+ _backup_create_repository(cfg,dist,dbg_repodir,False)
def is_repo_changed(repodir):
More information about the fedora-extras-commits
mailing list