[ostree] ostbuild: git-mirror: Also fetch patches git



commit 0d1ba45c7323add44b72ebc64f70b628ee819177
Author: Colin Walters <walters verbum org>
Date:   Thu May 24 18:11:06 2012 -0400

    ostbuild: git-mirror: Also fetch patches git

 src/ostbuild/pyostbuild/builtin_git_mirror.py |    2 ++
 src/ostbuild/pyostbuild/builtins.py           |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_git_mirror.py b/src/ostbuild/pyostbuild/builtin_git_mirror.py
index 34e2394..9c64d41 100755
--- a/src/ostbuild/pyostbuild/builtin_git_mirror.py
+++ b/src/ostbuild/pyostbuild/builtin_git_mirror.py
@@ -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:]
diff --git a/src/ostbuild/pyostbuild/builtins.py b/src/ostbuild/pyostbuild/builtins.py
index 4bcc733..b5fd104 100755
--- a/src/ostbuild/pyostbuild/builtins.py
+++ b/src/ostbuild/pyostbuild/builtins.py
@@ -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



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