diff options
author | Will Thompson <wjt@endlessos.org> | 2023-03-24 10:06:35 +0000 |
---|---|---|
committer | Will Thompson <wjt@endlessos.org> | 2023-03-24 10:06:35 +0000 |
commit | 38e8d4451c74bc62489a8543ab4b29aeaae14c3c (patch) | |
tree | 9becbb6470e10144628c68b43e7f4aa2230189d3 | |
parent | d47cdc3aed0d8667b3f5cdcbdff534fb331d9a5c (diff) | |
parent | 160b92daf385fbe627bd39ff4094316e2ecbf8f7 (diff) | |
download | gnome-initial-setup-38e8d4451c74bc62489a8543ab4b29aeaae14c3c.tar.gz |
Merge branch 'mcatanzaro/fedora-third-party-disable' into 'master'
software: don't ever call 'fedora-third-party disable'
Closes #186
See merge request GNOME/gnome-initial-setup!197
-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) { |