mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-31 11:01:22 -05:00
repair: Do some basic check for remotes
We should point out if refs in the repo refer to missing or disabled remotes, this is useful information. Closes: #2473 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
71411ee88c
commit
7ade0d07fe
@@ -396,6 +396,20 @@ flatpak_builtin_repair (int argc, char **argv, GCancellable *cancellable, GError
|
||||
}
|
||||
}
|
||||
|
||||
GLNX_HASH_TABLE_FOREACH_KV (all_refs, const char *, refspec, const char *, checksum)
|
||||
{
|
||||
g_autofree char *remote = NULL;
|
||||
g_autofree char *ref_name = NULL;
|
||||
|
||||
if (!ostree_parse_refspec (refspec, &remote, &ref_name, error))
|
||||
return FALSE;
|
||||
|
||||
if (!flatpak_dir_has_remote (dir, remote, NULL))
|
||||
g_print (_("Remote %s for ref %s is missing\n"), remote, ref_name);
|
||||
else if (flatpak_dir_get_remote_disabled (dir, remote))
|
||||
g_print (_("Remote %s for ref %s is disabled\n"), remote, ref_name);
|
||||
}
|
||||
|
||||
if (opt_dry_run)
|
||||
return TRUE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user