mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-09 13:57:52 +03:00
libostree: Adjust cleanup_ref_prefix
to use ostree_repo_list_refs_ext
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
c9b02ae1f3
commit
3e3621b7b6
@ -401,7 +401,7 @@ cleanup_ref_prefix (OstreeRepo *repo,
|
|||||||
|
|
||||||
prefix = g_strdup_printf ("ostree/%d/%d", bootversion, subbootversion);
|
prefix = g_strdup_printf ("ostree/%d/%d", bootversion, subbootversion);
|
||||||
|
|
||||||
if (!ostree_repo_list_refs (repo, prefix, &refs, cancellable, error))
|
if (!ostree_repo_list_refs_ext (repo, prefix, &refs, OSTREE_REPO_LIST_REFS_EXT_NONE, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
|
if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
|
||||||
@ -410,8 +410,7 @@ cleanup_ref_prefix (OstreeRepo *repo,
|
|||||||
g_hash_table_iter_init (&hashiter, refs);
|
g_hash_table_iter_init (&hashiter, refs);
|
||||||
while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
|
while (g_hash_table_iter_next (&hashiter, &hashkey, &hashvalue))
|
||||||
{
|
{
|
||||||
const char *suffix = hashkey;
|
const char *ref = hashkey;
|
||||||
g_autofree char *ref = g_strconcat (prefix, "/", suffix, NULL);
|
|
||||||
ostree_repo_transaction_set_refspec (repo, ref, NULL);
|
ostree_repo_transaction_set_refspec (repo, ref, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user