[ostree] ostbuild: Make resolve fully expand config-opts, delete now-unnecessary vcsconfig



commit 0a195e6874234925a277a13c57a69901d5bd1b0c
Author: Colin Walters <walters verbum org>
Date:   Wed Feb 22 15:17:42 2012 -0500

    ostbuild: Make resolve fully expand config-opts, delete now-unnecessary vcsconfig
    
    The source manifest format allows for compression, but it's more
    convenient for consuming code if it's fully expanded in one place.

 src/ostbuild/pyostbuild/builtin_resolve.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_resolve.py b/src/ostbuild/pyostbuild/builtin_resolve.py
index 408f316..7a1ec90 100755
--- a/src/ostbuild/pyostbuild/builtin_resolve.py
+++ b/src/ostbuild/pyostbuild/builtin_resolve.py
@@ -168,6 +168,17 @@ class OstbuildResolve(builtins.Builtin):
                                                           component['branch'])
             component['revision'] = revision
 
+            if 'component' not in component:
+                component['component'] = 'runtime'
+
+            config_opts = list(self.manifest['config-opts'])
+            config_opts.extend(component.get('config-opts', []))
+            component['config-opts'] = config_opts
+
+        # We expand these two keys
+        del self.manifest['config-opts']
+        del self.manifest['vcsconfig']
+
         mirror_gitconfig_path = os.path.join(self.mirrordir, 'gitconfig')
         git_mirrordir = os.path.join(self.mirrordir, 'git')
         f = open(mirror_gitconfig_path, 'w')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]