[ostree] pull local: Don't import objects we already have



commit ddf0a02f88f27dcb477295863f8f4369820c8254
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Mar 23 09:28:17 2016 +0100

    pull local: Don't import objects we already have
    
    In particular, I noticed this because the pull failed when trying to
    pull from a shallow repo which only had the new objects that was
    needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764059

 src/libostree/ostree-repo-pull.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index d27b15e..ecbd738 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -1188,7 +1188,8 @@ scan_one_metadata_object_c (OtPullData         *pull_data,
 
   if (pull_data->remote_repo_local)
     {
-      if (!ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
+      if (!is_stored &&
+          !ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
                                            objtype, tmp_checksum,
                                            cancellable, error))
         goto out;


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