diff options
author | Michael Catanzaro <mcatanzaro@redhat.com> | 2023-03-23 14:54:14 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@redhat.com> | 2023-03-23 14:54:14 -0500 |
commit | 160b92daf385fbe627bd39ff4094316e2ecbf8f7 (patch) | |
tree | 9becbb6470e10144628c68b43e7f4aa2230189d3 | |
parent | d47cdc3aed0d8667b3f5cdcbdff534fb331d9a5c (diff) | |
download | gnome-initial-setup-160b92daf385fbe627bd39ff4094316e2ecbf8f7.tar.gz |
software: don't ever call 'fedora-third-party disable'
Instead, leave the setting unset if third-party repos are not disabled
to give GNOME Software a chance to ask the user again. See:
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2118
https://pagure.io/fedora-workstation/issue/363
Fixes #186
-rw-r--r-- | gnome-initial-setup/pages/software/gis-software-page.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/gnome-initial-setup/pages/software/gis-software-page.c b/gnome-initial-setup/pages/software/gis-software-page.c index 16b00da..e1d0c28 100644 --- a/gnome-initial-setup/pages/software/gis-software-page.c +++ b/gnome-initial-setup/pages/software/gis-software-page.c @@ -81,25 +81,27 @@ gis_software_page_apply (GisPage *gis_page, g_autofree char *program = NULL; g_autoptr (GError) error = NULL; - program = find_fedora_third_party (); - - if (program) + if (priv->enabled) { - const char *arg1; - - if (priv->enabled) - arg1 = "enable"; - else - arg1 = "disable"; - - gis_pkexec (program, arg1, "root", &error); - if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - g_warning ("%s failed: %s", program, error->message); + program = find_fedora_third_party (); + if (program) + { + gis_pkexec (program, "enable", "root", &error); + if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("%s failed: %s", program, error->message); + } } + /* If not enabled, do nothing rather than calling 'fedora-third-party disable' + * to leave the setting in an indeterminate state, to allow GNOME Software to + * prompt the user once more when it runs for the first time. + */ + return FALSE; } +/* End distro-specific stuff */ + static void gis_software_page_locale_changed (GisPage *gis_page) { |