mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-05 13:31:32 -05:00
Make "flatpak update --appstream" update for all branches
This fixes https://github.com/flatpak/flatpak/issues/331
This commit is contained in:
@@ -63,9 +63,32 @@ update_appstream (FlatpakDir *dir, const char *remote, GCancellable *cancellable
|
||||
{
|
||||
gboolean changed;
|
||||
|
||||
if (!flatpak_dir_update_appstream (dir, remote, opt_arch, &changed,
|
||||
NULL, cancellable, error))
|
||||
return FALSE;
|
||||
if (remote == NULL)
|
||||
{
|
||||
g_auto(GStrv) remotes = NULL;
|
||||
int i;
|
||||
|
||||
remotes = flatpak_dir_list_remotes (dir, cancellable, error);
|
||||
if (remotes == NULL)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; remotes[i] != NULL; i++)
|
||||
{
|
||||
if (flatpak_dir_get_remote_disabled (dir, remotes[i]))
|
||||
continue;
|
||||
|
||||
g_print (_("Updating appstream for remote %s\n"), remotes[i]);
|
||||
if (!flatpak_dir_update_appstream (dir, remotes[i], opt_arch, &changed,
|
||||
NULL, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!flatpak_dir_update_appstream (dir, remote, opt_arch, &changed,
|
||||
NULL, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user