admin: Drop two uses of ostree_sysroot_get_path()
Moving towards it being a full library.
This commit is contained in:
parent
c6292942ff
commit
4abaf27e57
|
|
@ -41,7 +41,6 @@ ot_admin_builtin_diff (int argc, char **argv, OstreeSysroot *sysroot, GCancellab
|
||||||
{
|
{
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
gs_unref_object GFile *repo_path = NULL;
|
|
||||||
gs_unref_object OstreeDeployment *deployment = NULL;
|
gs_unref_object OstreeDeployment *deployment = NULL;
|
||||||
gs_unref_object GFile *deployment_dir = NULL;
|
gs_unref_object GFile *deployment_dir = NULL;
|
||||||
gs_unref_ptrarray GPtrArray *modified = NULL;
|
gs_unref_ptrarray GPtrArray *modified = NULL;
|
||||||
|
|
@ -59,8 +58,6 @@ ot_admin_builtin_diff (int argc, char **argv, OstreeSysroot *sysroot, GCancellab
|
||||||
if (!g_option_context_parse (context, &argc, &argv, error))
|
if (!g_option_context_parse (context, &argc, &argv, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
repo_path = g_file_resolve_relative_path (ostree_sysroot_get_path (sysroot), "ostree/repo");
|
|
||||||
|
|
||||||
if (!ostree_sysroot_list_deployments (sysroot, &bootversion, &deployments,
|
if (!ostree_sysroot_list_deployments (sysroot, &bootversion, &deployments,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
gs_unref_object OstreeRepo *repo = NULL;
|
gs_unref_object OstreeRepo *repo = NULL;
|
||||||
gs_unref_object GFile *repo_path = NULL;
|
|
||||||
gs_free char *origin_refspec = NULL;
|
gs_free char *origin_refspec = NULL;
|
||||||
gs_free char *origin_remote = NULL;
|
gs_free char *origin_remote = NULL;
|
||||||
gs_free char *origin_ref = NULL;
|
gs_free char *origin_ref = NULL;
|
||||||
|
|
@ -90,9 +89,7 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel
|
||||||
deployment_path = ostree_sysroot_get_deployment_directory (sysroot, merge_deployment);
|
deployment_path = ostree_sysroot_get_deployment_directory (sysroot, merge_deployment);
|
||||||
deployment_origin_path = ostree_sysroot_get_deployment_origin_path (deployment_path);
|
deployment_origin_path = ostree_sysroot_get_deployment_origin_path (deployment_path);
|
||||||
|
|
||||||
repo_path = g_file_resolve_relative_path (ostree_sysroot_get_path (sysroot), "ostree/repo");
|
if (!ostree_sysroot_get_repo (sysroot, &repo, cancellable, error))
|
||||||
repo = ostree_repo_new (repo_path);
|
|
||||||
if (!ostree_repo_open (repo, cancellable, error))
|
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
origin = ostree_deployment_get_origin (merge_deployment);
|
origin = ostree_deployment_get_origin (merge_deployment);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue