[ostree] ostbuild: Allow using dirty-git: for patches too



commit 71495309765b5ed1dfeacb124c8e1ef62702b712
Author: Colin Walters <walters verbum org>
Date:   Wed May 9 19:40:24 2012 -0400

    ostbuild: Allow using dirty-git: for patches too

 src/ostbuild/pyostbuild/builtin_checkout.py |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_checkout.py b/src/ostbuild/pyostbuild/builtin_checkout.py
index f9cba41..9a2d1f9 100755
--- a/src/ostbuild/pyostbuild/builtin_checkout.py
+++ b/src/ostbuild/pyostbuild/builtin_checkout.py
@@ -91,14 +91,18 @@ class OstbuildCheckout(builtins.Builtin):
             patches = component.get('patches')
             if patches is not None:
                 (patches_keytype, patches_uri) = buildutil.parse_src_key(patches['src'])
-                patches_mirror = buildutil.get_mirrordir(self.mirrordir, patches_keytype, patches_uri)
-                vcs.get_vcs_checkout(self.mirrordir, patches_keytype, patches_uri,
-                                     self.patchdir, patches['branch'],
-                                     overwrite=True)
+                if patches_keytype == 'git':
+                    patches_mirror = buildutil.get_mirrordir(self.mirrordir, patches_keytype, patches_uri)
+                    vcs.get_vcs_checkout(self.mirrordir, patches_keytype, patches_uri,
+                                         self.patchdir, patches['branch'],
+                                         overwrite=True)
+                    patchdir = self.patchdir
+                else:
+                    patchdir = patches_uri
 
                 patch_subdir = patches.get('subdir', None)
                 if patch_subdir is not None:
-                    patchdir = os.path.join(self.patchdir, patch_subdir)
+                    patchdir = os.path.join(patchdir, patch_subdir)
                 else:
                     patchdir = self.patchdir
                 for patch in patches['files']:



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