lib/sysroot: Add non-failable ostree_sysroot_repo()
Having a failable accessor is annoying, since it's really common to reference both. Instead, open the repo once when we load the sysroot, and provide a non-failable accessor. This is also prep for `ostree_repo_open_at()`, which collapses the separation between `ostree_repo_new()` and `ostree_repo_open()`. Closes: #886 Approved by: jlebon
This commit is contained in:
1 parent
ed430b45de
commit
9bf8a8503a
7 files changed
+47
-15
No files matched your search
@@ -1956,10 +1956,7 @@ ostree_sysroot_deploy_tree (OstreeSysroot *self,
|
||||
if (!glnx_opendirat (self->sysroot_fd, osdeploypath, TRUE, &os_deploy_dfd, error))
|
||||
return FALSE;
|
||||
|
||||
glnx_unref_object OstreeRepo *repo = NULL;
|
||||
if (!ostree_sysroot_get_repo (self, &repo, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
OstreeRepo *repo = ostree_sysroot_repo (self);
|
||||
glnx_unref_object OstreeDeployment *merge_deployment = NULL;
|
||||
if (provided_merge_deployment != NULL)
|
||||
merge_deployment = g_object_ref (provided_merge_deployment);
|
||||
|
||||
Reference in new issue
Block a user