From: Colin Walters Date: Tue, 5 Apr 2016 19:37:32 +0000 (-0400) Subject: pull: More consistently use remote_repo_local for local repos X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~53^2~13 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=594162f16a32e944d3bb2fdfea39aced6e6f620b;p=ostree.git pull: More consistently use remote_repo_local for local repos I think it's cleaner if we use `remote_repo_local` to know that we have a local repo. In reality, it might be nicest if we didn't even create an `OstreeFetcher` for this case, but untangling the code is tricky. Closes: #239 Approved by: alexlarsson --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index e86ede50..f292951e 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -1990,10 +1990,10 @@ ostree_repo_pull_with_options (OstreeRepo *self, else { pull_data->remote_name = g_strdup (remote_name_or_baseurl); - if (!ostree_repo_remote_get_gpg_verify (self, remote_name_or_baseurl, + if (!ostree_repo_remote_get_gpg_verify (self, pull_data->remote_name, &pull_data->gpg_verify, error)) goto out; - if (!ostree_repo_remote_get_gpg_verify_summary (self, remote_name_or_baseurl, + if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name, &pull_data->gpg_verify_summary, error)) goto out; } @@ -2123,7 +2123,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, } if (bytes_sig && - !_ostree_repo_remote_name_is_file (remote_name_or_baseurl) && + !pull_data->remote_repo_local && !_ostree_repo_load_cache_summary_if_same_sig (self, remote_name_or_baseurl, bytes_sig, @@ -2177,7 +2177,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, if (!summary_from_cache && bytes_summary && bytes_sig) { - if (!_ostree_repo_remote_name_is_file (remote_name_or_baseurl) && + if (!pull_data->remote_repo_local && !_ostree_repo_cache_summary (self, remote_name_or_baseurl, bytes_summary,