remote-add: Add -is-set keys for the new fields

This lets us keep track of which fields have been
explicitly set.

Closes: #2812
Approved by: alexlarsson
This commit is contained in:
Matthias Clasen
2019-04-10 07:26:57 -04:00
committed by Atomic Bot
parent f3ca031d00
commit dc32aae658

View File

@@ -172,24 +172,28 @@ get_config_from_opts (FlatpakDir *dir, const char *remote_name, gboolean *change
if (comment)
{
g_key_file_set_string (config, group, "xa.comment", comment);
g_key_file_set_boolean (config, group, "xa.comment-is-set", TRUE);
*changed = TRUE;
}
if (description)
{
g_key_file_set_string (config, group, "xa.description", description);
g_key_file_set_boolean (config, group, "xa.description-is-set", TRUE);
*changed = TRUE;
}
if (icon)
{
g_key_file_set_string (config, group, "xa.icon", icon);
g_key_file_set_boolean (config, group, "xa.icon-is-set", TRUE);
*changed = TRUE;
}
if (homepage)
{
g_key_file_set_string (config, group, "xa.homepage", homepage);
g_key_file_set_boolean (config, group, "xa.homepage-is-set", TRUE);
*changed = TRUE;
}