From 7721cb3ed9f1bf677628b81e3e2d38510f7b97d2 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Tue, 9 Jun 2009 12:15:37 +0100 Subject: [PATCH] When compiling from a local feed with no , use the uri attribute This can happen if you try to use a (signed) pubished master feed by its local path. Ensure that the resulting binary has a feed-for on the proper URI, not the path. --- build.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index d50afaf..f004696 100644 --- a/build.py +++ b/build.py @@ -334,11 +334,17 @@ def write_sample_interface(buildenv, iface, src_impl): feed_for = addSimple(root, 'feed-for') uri = iface.uri - if uri.startswith('/') and iface.feed_for: - for uri in iface.feed_for: - print "Note: source %s is a local feed" % iface.uri + if uri.startswith('/'): + print "Note: source %s is a local feed" % iface.uri + for feed_uri in iface.feed_for or []: + uri = feed_uri print "Will use instead..." % uri break + else: + master_feed = minidom.parse(uri).documentElement + if master_feed.hasAttribute('uri'): + uri = master_feed.getAttribute('uri') + print "Will use instead..." % uri feed_for.setAttributeNS(None, 'interface', uri) -- 2.11.4.GIT