[ostree] libostree/upgrader: Don't pull if there is no remote



commit 11ecf9267eae13da21521ee318f10cabaffc8a2a
Author: Colin Walters <walters verbum org>
Date:   Thu Mar 27 07:36:50 2014 -0400

    libostree/upgrader: Don't pull if there is no remote
    
    In this case we're just reading the local repo.

 src/libostree/ostree-sysroot-upgrader.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-sysroot-upgrader.c b/src/libostree/ostree-sysroot-upgrader.c
index 3d65641..b95c448 100644
--- a/src/libostree/ostree-sysroot-upgrader.c
+++ b/src/libostree/ostree-sysroot-upgrader.c
@@ -447,10 +447,13 @@ ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader  *self,
                                 error))
     goto out;
 
-  if (!ostree_repo_pull (repo, self->origin_remote, refs_to_fetch,
-                         flags, progress,
-                         cancellable, error))
-    goto out;
+  if (self->origin_remote)
+    {
+      if (!ostree_repo_pull (repo, self->origin_remote, refs_to_fetch,
+                             flags, progress,
+                             cancellable, error))
+        goto out;
+    }
 
   if (!ostree_repo_resolve_rev (repo, origin_refspec, FALSE, &self->new_revision,
                                 error))


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