jhbuild r2464 - in trunk: . jhbuild jhbuild/modtypes
- From: johncarr svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2464 - in trunk: . jhbuild jhbuild/modtypes
- Date: Wed, 5 Nov 2008 15:10:26 +0000 (UTC)
Author: johncarr
Date: Wed Nov 5 15:10:26 2008
New Revision: 2464
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2464&view=rev
Log:
* jhbuild/config.py:
* jhbuild/defaults.jhbuildrc:
Allow user to set a mirror_policy in .jhbuildrc
* jhbuild/modtypes/__init__.py:
If mirror policy is set, try and use a mirror repo
where possible. E.g. use git-mirror instead of SVN.
* jhbuild/modtypes/autotools.py:
* jhbuild/modtypes/waf.py:
* jhbuild/modtypes/linux.py:
* jhbuild/modtypes/cmake.py:
* jhbuild/modtypes/perl.py:
* jhbuild/modtypes/distutils.py:
* jhbuild/modtypes/mesa.py:
* jhbuild/modtypes/testmodule.py:
Modtypes need to pass config data to branching func.
Modified:
trunk/ChangeLog
trunk/jhbuild/config.py
trunk/jhbuild/defaults.jhbuildrc
trunk/jhbuild/modtypes/__init__.py
trunk/jhbuild/modtypes/autotools.py
trunk/jhbuild/modtypes/cmake.py
trunk/jhbuild/modtypes/distutils.py
trunk/jhbuild/modtypes/linux.py
trunk/jhbuild/modtypes/mesa.py
trunk/jhbuild/modtypes/perl.py
trunk/jhbuild/modtypes/testmodule.py
trunk/jhbuild/modtypes/waf.py
Modified: trunk/jhbuild/config.py
==============================================================================
--- trunk/jhbuild/config.py (original)
+++ trunk/jhbuild/config.py Wed Nov 5 15:10:26 2008
@@ -47,6 +47,7 @@
'jhbuildbot_master', 'jhbuildbot_slavename', 'jhbuildbot_password',
'jhbuildbot_svn_commits_box',
'use_local_modulesets',
+ 'mirror_policy', 'module_mirror_policy',
]
env_prepends = {}
Modified: trunk/jhbuild/defaults.jhbuildrc
==============================================================================
--- trunk/jhbuild/defaults.jhbuildrc (original)
+++ trunk/jhbuild/defaults.jhbuildrc Wed Nov 5 15:10:26 2008
@@ -115,6 +115,10 @@
# program to use for cvs
cvs_program = 'cvs'
+# try and use mirrors?
+mirror_policy = ""
+module_mirror_policy = {}
+
# whether not to emit notifications through the notification daemon
nonotify = False
Modified: trunk/jhbuild/modtypes/__init__.py
==============================================================================
--- trunk/jhbuild/modtypes/__init__.py (original)
+++ trunk/jhbuild/modtypes/__init__.py Wed Nov 5 15:10:26 2008
@@ -82,7 +82,7 @@
return dependencies, after, suggests
-def get_branch(node, repositories, default_repo):
+def get_branch(node, repositories, default_repo, config):
"""Scan for a <branch> element and create a corresponding Branch object."""
name = node.getAttribute('id')
for childnode in node.childNodes:
@@ -106,6 +106,13 @@
raise FatalError(_('Default Repository=%s not found for module id=%s. Possible repositories are %s')
% (default_repo, name, repositories))
+ if repo.mirrors:
+ mirror_type = config.mirror_policy
+ if name in config.module_mirror_policy:
+ mirror_type = config.module_mirror_policy[name]
+ if mirror_type in repo.mirrors:
+ repo = repo.mirrors[mirror_type]
+
return repo.branch_from_xml(name, childnode, repositories, default_repo)
Modified: trunk/jhbuild/modtypes/autotools.py
==============================================================================
--- trunk/jhbuild/modtypes/autotools.py (original)
+++ trunk/jhbuild/modtypes/autotools.py Wed Nov 5 15:10:26 2008
@@ -335,7 +335,7 @@
extra_env = config.module_extra_env.get(id)
dependencies, after, suggests = get_dependencies(node)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
Modified: trunk/jhbuild/modtypes/cmake.py
==============================================================================
--- trunk/jhbuild/modtypes/cmake.py (original)
+++ trunk/jhbuild/modtypes/cmake.py Wed Nov 5 15:10:26 2008
@@ -131,7 +131,7 @@
id = node.getAttribute('id')
dependencies, after, suggests = get_dependencies(node)
extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
Modified: trunk/jhbuild/modtypes/distutils.py
==============================================================================
--- trunk/jhbuild/modtypes/distutils.py (original)
+++ trunk/jhbuild/modtypes/distutils.py Wed Nov 5 15:10:26 2008
@@ -119,7 +119,7 @@
(node.getAttribute('supports-non-srcdir-builds') != 'no')
dependencies, after, suggests = get_dependencies(node)
extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
Modified: trunk/jhbuild/modtypes/linux.py
==============================================================================
--- trunk/jhbuild/modtypes/linux.py (original)
+++ trunk/jhbuild/modtypes/linux.py Wed Nov 5 15:10:26 2008
@@ -239,7 +239,7 @@
dependencies, after, suggests = get_dependencies(node)
extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
kconfigs = get_kconfigs(node, repositories, default_repo)
Modified: trunk/jhbuild/modtypes/mesa.py
==============================================================================
--- trunk/jhbuild/modtypes/mesa.py (original)
+++ trunk/jhbuild/modtypes/mesa.py Wed Nov 5 15:10:26 2008
@@ -142,7 +142,7 @@
dependencies, after, suggests = get_dependencies(node)
extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
Modified: trunk/jhbuild/modtypes/perl.py
==============================================================================
--- trunk/jhbuild/modtypes/perl.py (original)
+++ trunk/jhbuild/modtypes/perl.py Wed Nov 5 15:10:26 2008
@@ -118,7 +118,7 @@
dependencies, after, suggests = get_dependencies(node)
extra_env = config.module_extra_env.get(id)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
Modified: trunk/jhbuild/modtypes/testmodule.py
==============================================================================
--- trunk/jhbuild/modtypes/testmodule.py (original)
+++ trunk/jhbuild/modtypes/testmodule.py Wed Nov 5 15:10:26 2008
@@ -353,7 +353,7 @@
pass
dependencies, after, suggests = get_dependencies(node)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
tested_pkgs = get_tested_packages(node)
Modified: trunk/jhbuild/modtypes/waf.py
==============================================================================
--- trunk/jhbuild/modtypes/waf.py (original)
+++ trunk/jhbuild/modtypes/waf.py Wed Nov 5 15:10:26 2008
@@ -185,7 +185,7 @@
# override revision tag if requested.
dependencies, after, suggests = get_dependencies(node)
- branch = get_branch(node, repositories, default_repo)
+ branch = get_branch(node, repositories, default_repo, config)
if config.module_checkout_mode.get(module_id):
branch.checkout_mode = config.module_checkout_mode[module_id]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]