ostbuild: git-mirror: Also fetch patches git

This commit is contained in:
Colin Walters 2012-05-24 18:11:06 -04:00
parent 1a5ea54aff
commit 0d1ba45c73
2 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,8 @@ class OstbuildGitMirror(builtins.Builtin):
components = []
for component in self.snapshot['components']:
components.append(component['name'])
if 'patches' in self.snapshot:
components.append(self.snapshot['patches']['name'])
if args.start_at:
idx = components.index(args.start_at)
components = components[idx:]

View File

@ -135,6 +135,10 @@ class Builtin(object):
else:
target_snapshot = in_snapshot
component = self.find_component_in_snapshot(name, target_snapshot)
if (component is None and
'patches' in self.snapshot and
self.snapshot['patches']['name'] == name):
return self.snapshot['patches']
if component is None:
fatal("Couldn't find component '%s' in manifest" % (name, ))
return component