After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754315 - Temporarily remove the Software Sources dialog
Temporarily remove the Software Sources dialog
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-30 13:05 UTC by Michael Catanzaro
Modified: 2016-01-27 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Temporarily remove the Software Sources dialog (1.49 KB, patch)
2015-08-30 13:05 UTC, Michael Catanzaro
none Details | Review
Temporarily remove the Software Sources dialog (1.49 KB, patch)
2015-08-30 14:47 UTC, Michael Catanzaro
none Details | Review
Temporarily remove the Software Sources dialog (1.54 KB, patch)
2015-08-30 14:48 UTC, Michael Catanzaro
committed Details | Review
Revert "Temporarily remove the Software Sources dialog" (1.48 KB, patch)
2016-01-16 05:14 UTC, Michael Catanzaro
none Details | Review
software-sources: Temporarily remove the remove button (1.71 KB, patch)
2016-01-16 05:14 UTC, Michael Catanzaro
none Details | Review
android example (141.40 KB, image/png)
2016-01-20 11:50 UTC, Yanko Kaneti
  Details

Description Michael Catanzaro 2015-08-30 13:05:42 UTC
The risks of keeping this dialog are 890251345203489x greater than its
benefits. Get rid of it until the associated bugs are fixed.
Comment 1 Michael Catanzaro 2015-08-30 13:05:45 UTC
Created attachment 310306 [details] [review]
Temporarily remove the Software Sources dialog
Comment 2 Kalev Lember 2015-08-30 13:29:35 UTC
Review of attachment 310306 [details] [review]:

What happens to the translations of the commented out string? I guess they drop out of the generated .po files? If that's the case, can you hack around this somehow so that we don't lose the translations?
Comment 3 Michael Catanzaro 2015-08-30 14:47:42 UTC
Created attachment 310315 [details] [review]
Temporarily remove the Software Sources dialog

Good thinking.
Comment 4 Michael Catanzaro 2015-08-30 14:48:31 UTC
Created attachment 310316 [details] [review]
Temporarily remove the Software Sources dialog

(Forgot to 'git add' before submitting the last patch :)
Comment 5 Kalev Lember 2015-08-30 15:15:59 UTC
Review of attachment 310316 [details] [review]:

I am a bit sad have to drop this, but you are right. I agree this is the way to go for now until we make this work well. Right now it's just an accident waiting to happen that could lead to a user removing half of the packages on their system along with a 3rd party repo.

+1 from me.

We are in UI freeze now though - can you run this past the release team as well, please?
Comment 6 Matthias Clasen 2015-08-30 20:43:59 UTC
I'm not convinced by the premise. No actual dangers are listed in the bug.
Comment 7 Matthias Clasen 2015-08-30 21:01:05 UTC
And I'm quite dubious about the claim - if you have third-party repositories enabled that silently replace packages deep enough in the dependency chain to remove "all of gnome", then things were already broken on your system before, the breakage just hadn't become apparent yet.

If we let 3rd party repositories do that, then we can't provide any level of trust while managing updates, and could just as well remove gnome-software altogether.
Comment 8 Michael Catanzaro 2015-08-30 21:27:37 UTC
(In reply to Matthias Clasen from comment #7)
> If we let 3rd party repositories do that, then we can't provide any level of
> trust while managing updates, and could just as well remove gnome-software
> altogether.

We already let third party repositories do that. Specific examples of repositories that have caused the software sources dialog to uninstall GNOME:

https://copr.fedoraproject.org/coprs/rhughes/f20-gnome-3-12/
https://copr.fedoraproject.org/coprs/spot/chromium/ (I think because it replaced libusbx)

I'm absolutely in favor of prohibiting repositories from doing this, but that would require buy-in and technical coordination with copr and dnf (considering only Fedora here).

In the meantime, we need this to not happen again.
Comment 9 Michael Catanzaro 2015-08-31 18:33:02 UTC
Richard is looking into adding the ability to simulate a remove repo operation in PackageKit. Then we can use that to trawl the list of packages that would be removed and look for no-nos like gnome-shell, gdm, xorg-x11-server-Xorg (I would add those to the core moduleset), plus all the packages in the system moduleset, and make the remove button insensitive if they're present. Then it would be safe to bring back this dialog, IMO.

Now, I absolutely agree with you that repos shouldn't be replacing core packages in the first place. But users can use dnf or manually edit /etc/yum.repos.d to enable whatever repos they want. I wonder how hard it would be to add checks in gnome-software and dnf to prevent the installation of such repos?
Comment 10 Michael Catanzaro 2015-10-01 14:59:42 UTC
So... if we're not going to take this after all, we should at least remove the Remove button? I have not once ever seen the Remove button work properly, it either uninstalls my desktop or just fails to do anything....
Comment 11 Matthias Clasen 2015-10-01 19:21:45 UTC
I thought we did. Didn't Kalev work on patches for this a while ago ?
Comment 12 Michael Catanzaro 2015-10-01 20:47:11 UTC
Well this bug is still open, and if he did, they didn't make it into gnome-software-3.18.0-1.fc23....

In other news, the button actually worked when I used it to disable a (harmless) repo just now. That's a good improvement!
Comment 13 Michael Catanzaro 2015-12-10 15:05:42 UTC
Any update on this, Kalev?

You should change my patch's status to something other than accepted, if you don't want me to push it. :)
Comment 14 Michael Catanzaro 2016-01-16 01:54:42 UTC
Bug #732406 is still open, and this patch is still marked as accepted, so I'm going to commit this.

(On a less-serious note: today when I removed a repo (Google Talk plugin), it did no horrible damage, but also claimed I had no software installed from that repo (wrong) and failed to uninstall the plugin....)
Comment 15 Michael Catanzaro 2016-01-16 01:55:06 UTC
Attachment 310316 [details] pushed as cbc5567 - Temporarily remove the Software Sources dialog
Comment 16 Matthias Clasen 2016-01-16 03:06:42 UTC
I disagree with this
Comment 17 Matthias Clasen 2016-01-16 03:08:42 UTC
what happened to simply making this dialog readonly ? Not providing any information about installed repositories is not acceptable.
Comment 18 Michael Catanzaro 2016-01-16 05:00:29 UTC
(In reply to Matthias Clasen from comment #17)
> what happened to simply making this dialog readonly ?

Nobody ever made it happen.
Comment 19 Michael Catanzaro 2016-01-16 05:14:30 UTC
Created attachment 319165 [details] [review]
Revert "Temporarily remove the Software Sources dialog"

This reverts commit cbc5567f539ba44f3d7732a956f1452bcf88daa3.
Comment 20 Michael Catanzaro 2016-01-16 05:14:33 UTC
Created attachment 319166 [details] [review]
software-sources: Temporarily remove the remove button

The previous commit which removed the entire dialog was overkill. The
entire dialog is not dangerous; only the remove button is.
Comment 21 Rafal Luzynski 2016-01-16 13:26:21 UTC
While at this, see also: bug 726819.
Comment 22 Kalev Lember 2016-01-20 11:27:20 UTC
I have an old patch lying around that kills the repo removal feature and replaces it with enable/disable, leaving the .repo files in place and just editing them. https://kalev.fedorapeople.org/software-sources-on-off.png and a on/off button in the dialog when clicking on the row.

Michael, do you think that would be an improvement?
Comment 23 Yanko Kaneti 2016-01-20 11:50:13 UTC
Created attachment 319439 [details]
android example

As requested by kalev on IRC, an andorid example of a selectable row + checkbox.
Comment 24 Michael Catanzaro 2016-01-20 19:40:44 UTC
(In reply to Kalev Lember from comment #22)
> I have an old patch lying around that kills the repo removal feature and
> replaces it with enable/disable, leaving the .repo files in place and just
> editing them. https://kalev.fedorapeople.org/software-sources-on-off.png and
> a on/off button in the dialog when clicking on the row.
> 
> Michael, do you think that would be an improvement?

Absolutely. Very little can go wrong if you simply disable the repo. Then we don't have to worry about it uninstalling GNOME.
Comment 25 Richard Hughes 2016-01-27 10:48:39 UTC
Comment on attachment 319166 [details] [review]
software-sources: Temporarily remove the remove button

committed, thanks.
Comment 26 Richard Hughes 2016-01-27 10:48:41 UTC
Comment on attachment 319165 [details] [review]
Revert "Temporarily remove the Software Sources dialog"

committed, thanks.