diff --git a/app/flatpak-builtins-remote-modify.c b/app/flatpak-builtins-remote-modify.c index b69aa940..aa4e67a2 100644 --- a/app/flatpak-builtins-remote-modify.c +++ b/app/flatpak-builtins-remote-modify.c @@ -42,7 +42,9 @@ static gboolean opt_no_deps; static gboolean opt_enable; static gboolean opt_update_metadata; static gboolean opt_disable; +static gboolean opt_no_filter; static int opt_prio = -1; +static char *opt_filter; static char *opt_title; static char *opt_comment; static char *opt_description; @@ -77,6 +79,8 @@ static GOptionEntry common_options[] = { { "default-branch", 0, 0, G_OPTION_ARG_STRING, &opt_default_branch, N_("Default branch to use for this remote"), N_("BRANCH") }, { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id, N_("Collection ID"), N_("COLLECTION-ID") }, { "gpg-import", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_import, N_("Import GPG key from FILE (- for stdin)"), N_("FILE") }, + { "no-filter", 0, 0, G_OPTION_ARG_NONE, &opt_no_filter, N_("Disable local filter"), NULL }, + { "filter", 0, 0, G_OPTION_ARG_FILENAME, &opt_filter, N_("Set path to local filter FILE"), N_("FILE") }, { "disable", 0, 0, G_OPTION_ARG_NONE, &opt_disable, N_("Disable the remote"), NULL }, { NULL } }; @@ -167,6 +171,12 @@ get_config_from_opts (FlatpakDir *dir, const char *remote_name, gboolean *change *changed = TRUE; } + if (opt_filter || opt_no_filter) + { + g_key_file_set_string (config, group, "xa.filter", opt_no_filter ? "" : opt_filter); + *changed = TRUE; + } + if (opt_no_enumerate) { g_key_file_set_boolean (config, group, "xa.noenumerate", TRUE); diff --git a/doc/flatpak-remote-modify.xml b/doc/flatpak-remote-modify.xml index 0a2e8d43..6924ba4f 100644 --- a/doc/flatpak-remote-modify.xml +++ b/doc/flatpak-remote-modify.xml @@ -249,6 +249,16 @@ + + + + + + Modify the path (or unset) for the local filter used for this remote. + See flatpak-remote-add1 for details about the filter file format. + + +