Bug 1438528 - flatpaks are user installed, should be system installed
Summary: flatpaks are user installed, should be system installed
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-software
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1438531 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-03 16:19 UTC by Chris Murphy
Modified: 2018-05-29 11:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:44:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
gnome-software verbose log (1016.50 KB, text/plain)
2017-04-03 16:19 UTC, Chris Murphy
no flags Details

Description Chris Murphy 2017-04-03 16:19:55 UTC
Created attachment 1268431 [details]
gnome-software verbose log

Description of problem:

*.flatpakref files installed with gnome-software are installed as user applications in /home; but should be system installed.


Version-Release number of selected component (if applicable):
gnome-software-3.24.0-1.fc26.x86_64
PackageKit-1.1.5-4.fc26.x86_64


How reproducible:
Always


Steps to Reproduce:
1. http://flatpak.org/apps.html  Download the gnome twitch flatpak
2. Doubleclick *.flatpakref file.
3. Click Install

Actual results:

[chris@f26h ~]$ flatpak list
com.vinszent.GnomeTwitch/x86_64/master   user,current  
org.gnome.Platform/x86_64/3.24           user,runtime  
org.libreoffice.LibreOffice/x86_64/fresh system,current
org.gnome.Platform.Locale/x86_64/3.20    system,runtime
org.gnome.Platform/x86_64/3.20           system,runtime
[chris@f26h ~]$ 



Expected results:


The runtime and app should be system installed, not user.


Additional info:

Comment 1 Richard Hughes 2017-04-04 15:08:44 UTC
The key bit here is:

    GsPluginFlatpak chose GsFlatpak-user using scope

I'm working on this now upstream.

Comment 2 Richard Hughes 2017-04-04 15:09:13 UTC
*** Bug 1438531 has been marked as a duplicate of this bug. ***

Comment 3 Richard Hughes 2017-04-05 08:05:15 UTC
commit 1db2bb2a248a12113c56b982b34edcf02a057135
Author: Richard Hughes <richard>
Date:   Wed Apr 5 08:48:32 2017 +0100

    flatpak: Respect the user/system preference when installing flatpakref files
    
    When we load a flatpakref file we use the 'user-temp' GsFlatpak to avoid getting
    an authorisation dialog to just get the AppStream metadata. Once this GsApp is
    installed, we were always choosing the 'user' scope as this was set by the
    'user-temp' object. We need to do four things differently:
    
    1. Only ever use user-temp for file_to_app() handling
    2. Add the resulting GsApp to the system shared cache
    3. Reset the scope of the GsApp to 'any' after it has been created by 'user-temp'
    4. Return the cached GsApp if the application is already in the cache
    
    The last fix is needed so we return the GsApp with the appropriate state set
    if the user double clicks on a flatpakref that is already installed per-user
    or per-system as the 'user-temp' object is isolated of other instalations.
    
    As a side note, we only ever use the system GsFlatpak object if the system
    helper is usable, and we're not in self tests. Update the tests to work with
    these fixes.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1438528

:100644 100644 0c14954... 56b7e80... M  plugins/flatpak/gs-flatpak.c
:100644 100644 1d1e67a... 22065a8... M  plugins/flatpak/gs-plugin-flatpak.c

Comment 4 Richard Hughes 2017-04-05 08:49:13 UTC
There's a scratch build here: https://koji.fedoraproject.org/koji/taskinfo?taskID=18792571 -- any chance you could test this for me please. You'll need to killall gnome-software before re-launching things.

Comment 5 Yajo 2017-07-23 09:10:23 UTC
Not sure if this is what you expect, but as a user I'd like to be able to choose. Maybe 2 buttons like: Install for me, Install for everyone. If I click everyone, then I should have authorisation to do that.

Comment 6 Fedora End Of Life 2018-05-03 07:57:24 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2018-05-29 11:44:18 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.