mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-16 13:00:48 -04:00
flatpak remote-modify add --filter and --no-filter options
Closes: #2869 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
9454e2d65e
commit
2bd55552b6
@@ -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);
|
||||
|
||||
@@ -249,6 +249,16 @@
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--no-filter</option></term>
|
||||
<term><option>--filter=FILE</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Modify the path (or unset) for the local filter used for this remote.
|
||||
See <citerefentry><refentrytitle>flatpak-remote-add</refentrytitle><manvolnum>1</manvolnum></citerefentry> for details about the filter file format.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--gpg-import=FILE</option></term>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user