From a3246d590eecf707ae8bf4983413971317995e10 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 15 May 2012 08:39:17 -0400 Subject: [PATCH] ostbuild: Fix git-mirror --- src/ostbuild/pyostbuild/builtin_git_mirror.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ostbuild/pyostbuild/builtin_git_mirror.py b/src/ostbuild/pyostbuild/builtin_git_mirror.py index 5d827de2..687c0ead 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)