libostree, ostree: fix usage of ostree_repo_checkout_tree_at
it was deprecated, use ostree_repo_checkout_at. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #417 Approved by: cgwalters
This commit is contained in:
parent
0bac88e132
commit
edecae06ab
|
|
@ -546,7 +546,7 @@ checkout_deployment_tree (OstreeSysroot *sysroot,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
OstreeRepoCheckoutOptions checkout_opts = { 0, };
|
OstreeRepoCheckoutAtOptions checkout_opts = { 0, };
|
||||||
const char *csum = ostree_deployment_get_csum (deployment);
|
const char *csum = ostree_deployment_get_csum (deployment);
|
||||||
g_autofree char *checkout_target_name = NULL;
|
g_autofree char *checkout_target_name = NULL;
|
||||||
g_autofree char *osdeploy_path = NULL;
|
g_autofree char *osdeploy_path = NULL;
|
||||||
|
|
@ -571,9 +571,9 @@ checkout_deployment_tree (OstreeSysroot *sysroot,
|
||||||
if (!glnx_shutil_rm_rf_at (osdeploy_dfd, checkout_target_name, cancellable, error))
|
if (!glnx_shutil_rm_rf_at (osdeploy_dfd, checkout_target_name, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!ostree_repo_checkout_tree_at (repo, &checkout_opts, osdeploy_dfd,
|
if (!ostree_repo_checkout_at (repo, &checkout_opts, osdeploy_dfd,
|
||||||
checkout_target_name, csum,
|
checkout_target_name, csum,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!glnx_opendirat (osdeploy_dfd, checkout_target_name, TRUE, &ret_fd, error))
|
if (!glnx_opendirat (osdeploy_dfd, checkout_target_name, TRUE, &ret_fd, error))
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,12 @@ process_one_checkout (OstreeRepo *repo,
|
||||||
|
|
||||||
/* This strange code structure is to preserve testing
|
/* This strange code structure is to preserve testing
|
||||||
* coverage of both `ostree_repo_checkout_tree` and
|
* coverage of both `ostree_repo_checkout_tree` and
|
||||||
* `ostree_repo_checkout_tree_at` until such time as we have a more
|
* `ostree_repo_checkout_at` until such time as we have a more
|
||||||
* convenient infrastructure for testing C APIs with data.
|
* convenient infrastructure for testing C APIs with data.
|
||||||
*/
|
*/
|
||||||
if (opt_disable_cache || opt_whiteouts || opt_require_hardlinks)
|
if (opt_disable_cache || opt_whiteouts || opt_require_hardlinks)
|
||||||
{
|
{
|
||||||
OstreeRepoCheckoutOptions options = { 0, };
|
OstreeRepoCheckoutAtOptions options = { 0, };
|
||||||
|
|
||||||
if (opt_user_mode)
|
if (opt_user_mode)
|
||||||
options.mode = OSTREE_REPO_CHECKOUT_MODE_USER;
|
options.mode = OSTREE_REPO_CHECKOUT_MODE_USER;
|
||||||
|
|
@ -101,10 +101,10 @@ process_one_checkout (OstreeRepo *repo,
|
||||||
options.subpath = subpath;
|
options.subpath = subpath;
|
||||||
options.no_copy_fallback = opt_require_hardlinks;
|
options.no_copy_fallback = opt_require_hardlinks;
|
||||||
|
|
||||||
if (!ostree_repo_checkout_tree_at (repo, &options,
|
if (!ostree_repo_checkout_at (repo, &options,
|
||||||
AT_FDCWD, destination,
|
AT_FDCWD, destination,
|
||||||
resolved_commit,
|
resolved_commit,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue