[ostree/wip/ostbuild-v3] ostbuild: Fix git-mirror



commit 140ac93433e962ad901e692912fa63e81e515f9b
Author: Colin Walters <walters verbum org>
Date:   Tue May 15 08:39:17 2012 -0400

    ostbuild: Fix git-mirror

 src/ostbuild/pyostbuild/builtin_git_mirror.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_git_mirror.py b/src/ostbuild/pyostbuild/builtin_git_mirror.py
index 5d827de..687c0ea 100755
--- a/src/ostbuild/pyostbuild/builtin_git_mirror.py
+++ b/src/ostbuild/pyostbuild/builtin_git_mirror.py
@@ -48,16 +48,20 @@ class OstbuildGitMirror(builtins.Builtin):
         self.parse_snapshot(args.prefix, args.src_snapshot)
 
         if len(args.components) == 0:
-            components = self.snapshot['components'].keys()
+            components = []
+            for component in self.snapshot['components']:
+                components.append(component['name'])
         else:
             components = args.components
+
         for name in components:
-            component = self.snapshot['components'][name]
+            component = self.get_component(name)
             src = component['src']
             (keytype, uri) = vcs.parse_src_key(src)
             mirrordir = vcs.ensure_vcs_mirror(self.mirrordir, keytype, uri, component['branch'])
 
             if args.fetch:
+                log("Running git fetch for %s" % (name, ))
                 run_sync(['git', 'fetch'], cwd=mirrordir, log_initiation=False)
 
 builtins.register(OstbuildGitMirror)



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