[jhbuild] add support for a <redirect/> tag, to be used when modulesets are moved
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] add support for a <redirect/> tag, to be used when modulesets are moved
- Date: Thu, 9 Apr 2015 16:31:26 +0000 (UTC)
commit eea3ce6be0fbe8b6b9f0ca3ea9bb11c5d2835a9e
Author: Frédéric Péters <fpeters 0d be>
Date: Thu Apr 9 18:26:06 2015 +0200
add support for a <redirect/> tag, to be used when modulesets are moved
It will be used to keep existing instructions and configuration files working
after modulesets are moved in their own repository.
<redirect href="https://git.gnome.org/browse/gnome-modulesets/plain/gnome-core.modules?h=gnome-3-16"/>
jhbuild/moduleset.py | 5 +++++
modulesets/moduleset.dtd | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index d63ea61..d16c068 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -450,6 +450,11 @@ def _parse_module_set(config, uri):
assert document.documentElement.nodeName == 'moduleset'
+ for node in _child_elements_matching(document.documentElement, ['redirect']):
+ new_url = node.getAttribute('href')
+ logging.info('moduleset is now located at %s', new_url)
+ return _parse_module_set(config, new_url)
+
_handle_conditions(config, document.documentElement)
moduleset = ModuleSet(config = config)
diff --git a/modulesets/moduleset.dtd b/modulesets/moduleset.dtd
index 15a2e85..ae2af01 100644
--- a/modulesets/moduleset.dtd
+++ b/modulesets/moduleset.dtd
@@ -1,4 +1,4 @@
-<!ELEMENT moduleset
(repository|include|autotools|metamodule|tarball|distutils|perl|linux|testmodule|cvsroot|cvsmodule|waf|cmake|systemmodule)+>
+<!ELEMENT moduleset
(redirect|repository|include|autotools|metamodule|tarball|distutils|perl|linux|testmodule|cvsroot|cvsmodule|waf|cmake|systemmodule)+>
<!ATTLIST moduleset
name CDATA #IMPLIED>
@@ -47,6 +47,9 @@
<!ELEMENT include EMPTY>
<!ATTLIST include href CDATA #REQUIRED>
+<!ELEMENT redirect EMPTY>
+<!ATTLIST redirect href CDATA #REQUIRED>
+
<!ELEMENT autotools
(if*,autogenargs*,makeargs*,makeinstallargs*,pkg-config?,branch,dependencies?,suggests?,after?)>
<!-- Note: Here the ID type is not used as some existing IDs in modsets are not
valid XML ID types - instead CDATA is used -->
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]