jhbuild r1833 - in trunk: . jhbuild jhbuild/modtypes modulesets
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r1833 - in trunk: . jhbuild jhbuild/modtypes modulesets
- Date: Thu, 17 Jan 2008 11:06:22 +0000 (GMT)
Author: fpeters
Date: Thu Jan 17 11:06:21 2008
New Revision: 1833
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1833&view=rev
Log:
* jhbuild/modtypes/__init__.py, jhbuild/modtypes/autotools.py,
jhbuild/modtypes/cmake.py, jhbuild/modtypes/distutils.py,
jhbuild/modtypes/linux.py, jhbuild/modtypes/mesa.py,
jhbuild/modtypes/mozillamodule.py, jhbuild/modtypes/perl.py,
jhbuild/modtypes/tarball.py, jhbuild/modtypes/testmodule.py,
jhbuild/modtypes/waf.py, jhbuild/moduleset.py,
modulesets/gnome-external-deps-2.22.modules: updated <suggests>
semantic to add the module if it is available, moved poppler-data from
dependency to suggest of poppler.
Modified:
trunk/ChangeLog
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/mozillamodule.py
trunk/jhbuild/modtypes/perl.py
trunk/jhbuild/modtypes/tarball.py
trunk/jhbuild/modtypes/testmodule.py
trunk/jhbuild/modtypes/waf.py
trunk/jhbuild/moduleset.py
trunk/modulesets/gnome-external-deps-2.22.modules
Modified: trunk/jhbuild/modtypes/__init__.py
==============================================================================
--- trunk/jhbuild/modtypes/__init__.py (original)
+++ trunk/jhbuild/modtypes/__init__.py Thu Jan 17 11:06:21 2008
@@ -57,20 +57,25 @@
return parser(node, config, uri, repositories, default_repo)
def get_dependencies(node):
- """Scan for dependencies in <dependencies> and <after> elements."""
+ """Scan for dependencies in <dependencies>, <suggests> and <after> elements."""
dependencies = []
after = []
+ suggests = []
for childnode in node.childNodes:
if childnode.nodeType != childnode.ELEMENT_NODE: continue
if childnode.nodeName == 'dependencies':
for dep in childnode.childNodes:
if dep.nodeType == dep.ELEMENT_NODE and dep.nodeName == 'dep':
dependencies.append(dep.getAttribute('package'))
- elif childnode.nodeName in ['after', 'suggests']:
+ elif childnode.nodeName == 'suggests':
+ for dep in childnode.childNodes:
+ if dep.nodeType == dep.ELEMENT_NODE and dep.nodeName == 'dep':
+ suggests.append(dep.getAttribute('package'))
+ elif childnode.nodeName == 'after':
for dep in childnode.childNodes:
if dep.nodeType == dep.ELEMENT_NODE and dep.nodeName == 'dep':
after.append(dep.getAttribute('package'))
- return dependencies, after
+ return dependencies, after, suggests
def get_branch(node, repositories, default_repo):
"""Scan for a <branch> element and create a corresponding Branch object."""
@@ -138,10 +143,12 @@
type = 'base'
STATE_START = 'start'
STATE_DONE = 'done'
- def __init__(self, name, dependencies=[], after=[]):
+ def __init__(self, name, dependencies=[], after=[], suggests=[]):
self.name = name
self.dependencies = dependencies
self.after = after
+ self.suggests = suggests
+
def __repr__(self):
return "<%s '%s'>" % (self.__class__.__name__, self.name)
@@ -220,8 +227,8 @@
def parse_metamodule(node, config, url, repos, default_repo):
id = node.getAttribute('id')
- dependencies, after = get_dependencies(node)
- return MetaModule(id, dependencies=dependencies, after=after)
+ dependencies, after, suggests = get_dependencies(node)
+ return MetaModule(id, dependencies=dependencies, after=after, suggests=suggests)
register_module_type('metamodule', parse_metamodule)
Modified: trunk/jhbuild/modtypes/autotools.py
==============================================================================
--- trunk/jhbuild/modtypes/autotools.py (original)
+++ trunk/jhbuild/modtypes/autotools.py Thu Jan 17 11:06:21 2008
@@ -46,12 +46,12 @@
def __init__(self, name, branch, autogenargs='', makeargs='',
makeinstallargs='',
- dependencies=[], after=[],
+ dependencies=[], after=[], suggests=[],
supports_non_srcdir_builds=True,
skip_autogen=False,
autogen_sh='autogen.sh',
makefile='Makefile'):
- Package.__init__(self, name, dependencies, after)
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.autogenargs = autogenargs
self.makeargs = makeargs
@@ -268,7 +268,7 @@
autogenargs += ' ' + config.module_autogenargs.get(id, config.autogenargs)
makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
@@ -277,6 +277,7 @@
makeinstallargs=makeinstallargs,
dependencies=dependencies,
after=after,
+ suggests=suggests,
supports_non_srcdir_builds=supports_non_srcdir_builds,
skip_autogen=skip_autogen,
autogen_sh=autogen_sh,
@@ -314,7 +315,7 @@
autogenargs += ' ' + config.module_autogenargs.get(id, config.autogenargs)
makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
for attrname in ['cvsroot', 'root']:
if node.hasAttribute(attrname):
@@ -333,7 +334,7 @@
return AutogenModule(id, branch, autogenargs, makeargs,
dependencies=dependencies,
- after=after,
+ after=after, suggests=suggests,
supports_non_srcdir_builds=supports_non_srcdir_builds)
register_module_type('cvsmodule', parse_cvsmodule)
@@ -363,7 +364,7 @@
autogenargs += ' ' + config.module_autogenargs.get(id, config.autogenargs)
makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
if node.hasAttribute('root'):
repo = repositories[node.getAttribute('root')]
@@ -373,7 +374,7 @@
return AutogenModule(id, branch, autogenargs, makeargs,
dependencies=dependencies,
- after=after,
+ after=after, suggests=suggests,
supports_non_srcdir_builds=supports_non_srcdir_builds)
register_module_type('svnmodule', parse_svnmodule)
@@ -402,7 +403,7 @@
autogenargs += ' ' + config.module_autogenargs.get(id, config.autogenargs)
makeargs += ' ' + config.module_makeargs.get(id, makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
if node.hasAttribute('root'):
repo = repositories[node.getAttribute('root')]
@@ -412,6 +413,6 @@
return AutogenModule(id, branch, autogenargs, makeargs,
dependencies=dependencies,
- after=after,
+ after=after, suggests=suggests,
supports_non_srcdir_builds=supports_non_srcdir_builds)
register_module_type('archmodule', parse_archmodule)
Modified: trunk/jhbuild/modtypes/cmake.py
==============================================================================
--- trunk/jhbuild/modtypes/cmake.py (original)
+++ trunk/jhbuild/modtypes/cmake.py Thu Jan 17 11:06:21 2008
@@ -38,8 +38,8 @@
STATE_BUILD = 'build'
STATE_INSTALL = 'install'
- def __init__(self, name, branch, dependencies=[], after=[]):
- Package.__init__(self, name, dependencies, after)
+ def __init__(self, name, branch, dependencies=[], after=[], suggests=[]):
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
def get_srcdir(self, buildscript):
@@ -119,13 +119,13 @@
def parse_cmake(node, config, uri, repositories, default_repo):
id = node.getAttribute('id')
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
- return CMakeModule(id, branch, dependencies=dependencies, after=after)
+ return CMakeModule(id, branch, dependencies=dependencies, after=after, suggests=suggests)
register_module_type('cmake', parse_cmake)
Modified: trunk/jhbuild/modtypes/distutils.py
==============================================================================
--- trunk/jhbuild/modtypes/distutils.py (original)
+++ trunk/jhbuild/modtypes/distutils.py Thu Jan 17 11:06:21 2008
@@ -39,9 +39,9 @@
STATE_INSTALL = 'install'
def __init__(self, name, branch,
- dependencies=[], after=[],
+ dependencies=[], after=[], suggests=[],
supports_non_srcdir_builds=True):
- Package.__init__(self, name, dependencies, after)
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.supports_non_srcdir_builds = supports_non_srcdir_builds
@@ -123,13 +123,14 @@
if node.hasAttribute('supports-non-srcdir-builds'):
supports_non_srcdir_builds = \
(node.getAttribute('supports-non-srcdir-builds') != 'no')
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
return DistutilsModule(id, branch,
dependencies=dependencies, after=after,
+ suggests=suggests,
supports_non_srcdir_builds=supports_non_srcdir_builds)
register_module_type('distutils', parse_distutils)
Modified: trunk/jhbuild/modtypes/linux.py
==============================================================================
--- trunk/jhbuild/modtypes/linux.py (original)
+++ trunk/jhbuild/modtypes/linux.py Thu Jan 17 11:06:21 2008
@@ -44,8 +44,8 @@
STATE_INSTALL = 'install'
STATE_MODULES_INSTALL = 'modules_install'
- def __init__(self, name, branch, kconfigs, makeargs, dependencies, after):
- Package.__init__(self, name, dependencies, after)
+ def __init__(self, name, branch, kconfigs, makeargs, dependencies, after, suggests):
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.kconfigs = kconfigs
self.makeargs = makeargs
@@ -231,13 +231,13 @@
makeargs = p.sub(config.prefix, makeargs)
makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
kconfigs = get_kconfigs(node, repositories, default_repo)
return LinuxModule(id, branch, kconfigs,
- makeargs, dependencies, after)
+ makeargs, dependencies, after, suggests)
register_module_type('linux', parse_linux)
Modified: trunk/jhbuild/modtypes/mesa.py
==============================================================================
--- trunk/jhbuild/modtypes/mesa.py (original)
+++ trunk/jhbuild/modtypes/mesa.py Thu Jan 17 11:06:21 2008
@@ -41,8 +41,8 @@
STATE_INSTALL = 'install'
def __init__(self, name, branch, makeargs='',
- dependencies=[], after=[]):
- Package.__init__(self, name, dependencies, after)
+ dependencies=[], after=[], suggests=[]):
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.makeargs = makeargs
@@ -151,11 +151,12 @@
# override revision tag if requested.
makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
return MesaModule(id, branch, makeargs,
- dependencies=dependencies, after=after)
+ dependencies=dependencies, after=after,
+ suggests=suggests)
register_module_type('mesa', parse_mesa)
Modified: trunk/jhbuild/modtypes/mozillamodule.py
==============================================================================
--- trunk/jhbuild/modtypes/mozillamodule.py (original)
+++ trunk/jhbuild/modtypes/mozillamodule.py Thu Jan 17 11:06:21 2008
@@ -30,12 +30,14 @@
class MozillaModule(AutogenModule):
def __init__(self, name, projects, revision, autogenargs='',
- makeargs='', dependencies=[], after=[], repository=None):
+ makeargs='', dependencies=[], after=[], suggests=[],
+ repository=None):
AutogenModule.__init__(self, name, branch=None,
autogenargs=autogenargs,
makeargs=makeargs,
dependencies=dependencies,
after=after,
+ suggests=suggests,
supports_non_srcdir_builds=False)
self.repository = repository
self.revision = revision
@@ -177,7 +179,7 @@
config.autogenargs)
makeargs += ' ' + config.module_makeargs.get(name, config.makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
for attrname in ['cvsroot', 'root']:
if node.hasAttribute(attrname):
@@ -187,6 +189,6 @@
repo = repositories.get(default_repo, None)
return MozillaModule(name, projects, revision, autogenargs, makeargs,
- dependencies, after, repo)
+ dependencies, after, suggests, repo)
register_module_type('mozillamodule', parse_mozillamodule)
Modified: trunk/jhbuild/modtypes/perl.py
==============================================================================
--- trunk/jhbuild/modtypes/perl.py (original)
+++ trunk/jhbuild/modtypes/perl.py Thu Jan 17 11:06:21 2008
@@ -40,8 +40,8 @@
STATE_INSTALL = 'install'
def __init__(self, name, branch, makeargs='',
- dependencies=[], after=[]):
- Package.__init__(self, name, dependencies, after)
+ dependencies=[], after=[], suggests=[]):
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.makeargs = makeargs
@@ -121,12 +121,13 @@
p = re.compile('(\${prefix})')
makeargs = p.sub(config.prefix, makeargs)
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
return PerlModule(id, branch, makeargs,
- dependencies=dependencies, after=after)
+ dependencies=dependencies, after=after,
+ suggests=suggests)
register_module_type('perl', parse_perl)
Modified: trunk/jhbuild/modtypes/tarball.py
==============================================================================
--- trunk/jhbuild/modtypes/tarball.py (original)
+++ trunk/jhbuild/modtypes/tarball.py Thu Jan 17 11:06:21 2008
@@ -67,7 +67,7 @@
# for tarballs, don't ever pass --enable-maintainer-mode
autogenargs = autogenargs.replace('--enable-maintainer-mode', '')
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
from autotools import AutogenModule
from jhbuild.versioncontrol.tarball import TarballBranch, TarballRepository
@@ -80,7 +80,7 @@
return AutogenModule(name, branch,
autogenargs, makeargs, '',
- dependencies, after,
+ dependencies, after, suggests,
supports_non_srcdir_builds = supports_non_srcdir_builds,
skip_autogen = False, autogen_sh = 'configure')
Modified: trunk/jhbuild/modtypes/testmodule.py
==============================================================================
--- trunk/jhbuild/modtypes/testmodule.py (original)
+++ trunk/jhbuild/modtypes/testmodule.py Thu Jan 17 11:06:21 2008
@@ -377,12 +377,12 @@
# FIXME: create an error here
pass
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(id):
branch.checkout_mode = config.module_checkout_mode[id]
tested_pkgs = get_tested_packages(node)
return TestModule(id, branch, test_type, dependencies=dependencies,
- after=after, tested_pkgs=tested_pkgs)
+ after=after, suggests=suggests, tested_pkgs=tested_pkgs)
register_module_type('testmodule', parse_testmodule)
Modified: trunk/jhbuild/modtypes/waf.py
==============================================================================
--- trunk/jhbuild/modtypes/waf.py (original)
+++ trunk/jhbuild/modtypes/waf.py Thu Jan 17 11:06:21 2008
@@ -44,8 +44,9 @@
STATE_DIST = 'dist'
STATE_INSTALL = 'install'
- def __init__(self, name, branch, dependencies=[], after=[], waf_cmd='waf'):
- Package.__init__(self, name, dependencies, after)
+ def __init__(self, name, branch, dependencies=[], after=[], suggests=[],
+ waf_cmd='waf'):
+ Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.waf_cmd = waf_cmd
@@ -177,12 +178,12 @@
waf_cmd = node.getAttribute('waf-command')
# override revision tag if requested.
- dependencies, after = get_dependencies(node)
+ dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
if config.module_checkout_mode.get(module_id):
branch.checkout_mode = config.module_checkout_mode[module_id]
return WafModule(module_id, branch, dependencies=dependencies, after=after,
- waf_cmd=waf_cmd)
+ suggests=suggests, waf_cmd=waf_cmd)
register_module_type('waf', parse_waf)
Modified: trunk/jhbuild/moduleset.py
==============================================================================
--- trunk/jhbuild/moduleset.py (original)
+++ trunk/jhbuild/moduleset.py Thu Jan 17 11:06:21 2008
@@ -71,7 +71,7 @@
def get_module_list(self, seed, skip=[]):
'''gets a list of module objects (in correct dependency order)
- needed to build the modules in the seed list''' #"
+ needed to build the modules in the seed list'''
if seed == 'all': seed = self.modules.keys()
try:
@@ -82,6 +82,7 @@
i = 0
while i < len(modules):
depadd = []
+ # dependencies
for modname in modules[i].dependencies:
if self.modules.has_key(modname):
depmod = self.modules[modname]
@@ -90,6 +91,15 @@
% modname)
if depmod not in modules[:i+1] and depmod.name not in skip:
depadd.append(depmod)
+ # suggests
+ for modname in modules[i].suggests:
+ if self.modules.has_key(modname):
+ depmod = self.modules[modname]
+ else:
+ # silently ignore unknown modules
+ continue
+ if depmod not in modules[:i+1] and depmod.name not in skip:
+ depadd.append(depmod)
if depadd:
modules[i:i] = depadd
else:
Modified: trunk/modulesets/gnome-external-deps-2.22.modules
==============================================================================
--- trunk/modulesets/gnome-external-deps-2.22.modules (original)
+++ trunk/modulesets/gnome-external-deps-2.22.modules Thu Jan 17 11:06:21 2008
@@ -258,8 +258,10 @@
md5sum="a585677188cd56a090c4dc3357e03a95" size="1292971"/>
<dependencies>
<dep package="cairo"/>
- <dep package="poppler-data"/>
</dependencies>
+ <suggests>
+ <dep package="poppler-data"/>
+ </suggests>
<after>
<dep package="gtk+"/>
</after>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]