Bug 403694

Summary: It's possible to remove Flatpak repo during installation of app in this repo
Product: [Applications] Discover Reporter: Alexander Mentyu <notuxius>
Component: Flatpak BackendAssignee: Aleix Pol <aleixpol>
Status: CONFIRMED ---    
Severity: normal CC: bugseforuns, jgrulich, nate
Priority: NOR    
Version First Reported In: 5.14.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alexander Mentyu 2019-01-28 14:51:02 UTC
STEPS TO REPRODUCE
1. Start Discover.
2. Open 'Sources' page.
3. Add Flatpak source - like - https://firefox-flatpak.mojefedora.cz/org.mozilla.FirefoxRepo.flatpakrepo
4. Start installing Firefox app from the added Flatpak repo.
5. Press 'Delete the origin' button near the Flatpak source on 'Sources' page during installation of Firefox.

OBSERVED RESULT
The Flatpak source is removed without any error.

EXPECTED RESULT
'Failed to remove the source' error popups without removing the source. 

SOFTWARE/OS VERSIONS
Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.2
Kernel Version: 4.15.0-42-generic

ADDITIONAL INFORMATION
When the Firefox app is installed 'Failed to remove the source' error popups without removing the source after pressing the 'Delete the origin' button.
Comment 1 Nate Graham 2019-02-06 01:08:40 UTC
Actually, what should happen here is that the "remove" button for a source should be disabled while that source is currently being used to install an app--or even just while any installation or upgrade operation is in progress.

I tried adding "enabled: !resourcesModel.isBusy" and "enabled: !appsModel.isBusy" to the action but neither of those had any effect.