[ostree: 37/70] pull: Don't try to cache summaries for pull-local



commit eabb4e3545ee51f52d8ad9b09d2ffa918d49ab62
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Apr 4 14:26:53 2016 +0200

    pull: Don't try to cache summaries for pull-local
    
    Not only does this not make sense from a performance perspective, but
    it also doesn't work because we can't use a url as a path element.
    
    Closes: #237
    Approved by: cgwalters

 src/libostree/ostree-repo-pull.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 2628480..238fdf6 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -2107,12 +2107,14 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
         soup_uri_free (uri);
       }
 
-    if (bytes_sig && !_ostree_repo_load_cache_summary_if_same_sig (self,
-                                                                   remote_name_or_baseurl,
-                                                                   bytes_sig,
-                                                                   &bytes_summary,
-                                                                   cancellable,
-                                                                   error))
+    if (bytes_sig &&
+        !_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        !_ostree_repo_load_cache_summary_if_same_sig (self,
+                                                      remote_name_or_baseurl,
+                                                      bytes_sig,
+                                                      &bytes_summary,
+                                                      cancellable,
+                                                      error))
       goto out;
 
     if (bytes_summary)
@@ -2160,7 +2162,8 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
     if (!summary_from_cache && bytes_summary && bytes_sig)
       {
-        if (!_ostree_repo_cache_summary (self,
+        if (!_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+            !_ostree_repo_cache_summary (self,
                                          remote_name_or_baseurl,
                                          bytes_summary,
                                          bytes_sig,


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