Bug 1294628 - Gnome software cached wrong desktop file (if more than one)
Gnome software cached wrong desktop file (if more than one)
Product: Fedora
Classification: Fedora
Component: gnome-software (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-12-29 05:50 EST by Chieh Yu
Modified: 2016-01-17 20:48 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-07 12:21:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chieh Yu 2015-12-29 05:50:40 EST
Description of problem:
I'm testing Synology Cloud Station Drive package.
(you can download from here http://global.download.synology.com/download/Tools/CloudStation/4.0-4062/Fedora/Installer/x86_64/synology-cloud-station-drive-4.0-4062.x86_64.rpm)

After I install rpm through gnome-software, the launch button show up but not effect when I click it.

I found that this package has TWO desktop file, and one is put in /opt/Synology, another one is in /usr/share/applications. packagekit choose first one as launch entry and that is not in /usr/share/applications folder which lead to no such file error.

The problem can be solved by reboot, so I think here must be some data not updated or cache not cleared. I try pkcon refresh force, update-desktop-database, etc, but no one works.

Please help.

Version-Release number of selected component (if applicable):3.18.2 

How reproducible:

Steps to Reproduce:
1. Install synology Cloud Station package

Actual results:
launch button has no effect

Expected results:
launch process 

Additional info:
Comment 1 Chieh Yu 2015-12-29 22:50:29 EST
From the source code here


Gnome-software just *guess* app id using a for loop over all files that package installed and find the first desktop as it app id.

In Synology package, there are two desktop file, and the wrong one is used.

The solution in code should we only check desktop file under normal desktop file path. eg. /usr/share/applications or user home directory.
Comment 2 Richard Hughes 2016-01-07 12:17:40 EST
Why is the desktop file in /usr/ more important than the one in /opt? Why is the package installing a desktop file in /opt anyway? I'm not against fixing this, but I also think it makes sense to fix the package.
Comment 3 Richard Hughes 2016-01-07 12:21:06 EST
commit b4c4640ef820a95e032b754c91aa1c3db24dd9af
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Jan 7 17:20:01 2016 +0000

    Only match packaged .desktop files in /usr/share/applications
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1294628
Comment 4 Chieh Yu 2016-01-17 20:48:19 EST
Sorry for the late reply. I won't touch the bug status, but just reply question from Richard. This package use another desktop file to setup up autostart. The file is located in /opt and only link to ~/.config/autostart/ (I'm not so sure about the path) when user want the software autostart. That's why there are two desktop file.

Richard, thanks for helping solve the bug. Thank you.

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