[jhbuild] Allow config moduleset to contain sub-directories (GNOME bug 636359)
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] Allow config moduleset to contain sub-directories (GNOME bug 636359)
- Date: Mon, 13 Dec 2010 11:30:52 +0000 (UTC)
commit 9af72319c6902e00f65df2f5b6ab3a8c2a1a9085
Author: Craig Keogh <cskeogh adam com au>
Date: Fri Dec 3 20:29:50 2010 +1030
Allow config moduleset to contain sub-directories (GNOME bug 636359)
Setting the following in ~/.jhbuildrc now works:
moduleset = ['other/pulseaudio']
jhbuild/moduleset.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index f07c7c6..572f62f 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -287,11 +287,15 @@ def load(config, uri=None):
modulesets = [ config.moduleset ]
ms = ModuleSet(config = config)
for uri in modulesets:
- if '/' not in uri and not os.path.isfile(uri):
- if config.modulesets_dir and config.nonetwork or config.use_local_modulesets:
+ if config.modulesets_dir and config.nonetwork or config.use_local_modulesets:
+ if os.path.isfile(os.path.join(config.modulesets_dir,
+ uri + '.modules')):
uri = os.path.join(config.modulesets_dir, uri + '.modules')
- else:
- uri = 'http://git.gnome.org/browse/jhbuild/plain/modulesets/%s.modules' % uri
+ elif os.path.isfile(os.path.join(config.modulesets_dir, uri)):
+ uri = os.path.join(config.modulesets_dir, uri)
+ elif not urlparse.urlparse(uri).scheme:
+ uri = 'http://git.gnome.org/browse/jhbuild/plain/modulesets' \
+ '/%s.modules' % uri
try:
ms.modules.update(_parse_module_set(config, uri).modules)
except xml.parsers.expat.ExpatError, e:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]