Bug 481352

Summary: xdg-desktop-menu installs in /usr/local/share/applications
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: aqsisAssignee: Nicolas Chauvet (kwizart) <kwizart>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: denis, kwizart, pertusus, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-19 10:22:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2009-01-23 17:30:46 UTC
Description of problem:
I found unowned aqsis desktop files in /usr/local/share/applications.  They were created the same day I installed aqsis.  I tested by doing an rpm -e of the aqsis packages; the files were removed.  Since the aqsis scripts use xdg-desktop-menu to install and remove the desktop files, it appears that xdg-desktop-menu is to blame.

Version-Release number of selected component (if applicable):
xdg-utils-1.0.2-5.20081121cvs.fc10.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Install aqsis
2. Unowned desktop files appear in /usr/local/share/applications
3. Uninstall aqsis
4. The desktop files disappear (but defaults.list and mimeinfo.cache remain)
  
Actual results:
Desktop files are installed to and uninstalled from /usr/local/share/applications.

Expected results:
/usr/local shouldn't be touched

Additional info:

Comment 1 Rex Dieter 2009-01-23 17:40:38 UTC
aqsis shouldn't be calling xdg-desktop-menu in %post (that's something for *build* time, not *install* time, which it already does via desktop-file-install) and is a packaging bug, reassigning

Comment 2 Rex Dieter 2009-01-23 17:44:54 UTC
In short, just remove all the 
xdg-desktop-menu
calls in %post (etc...) , and all should well.	

Looking closer in cvs, I'm not sure you really want to be doing all those 'uninstall' operations in %pre either.  rpm is funky, one upgrade, the scriplets from the old pkgs are run *after* those from the upgraded one.  So, in the least, you'll want to wrap those in something like
if [ $1 -eq 0 ]; then

fi
to ensure they're only run on erasure, and not pkg upgrades.

Comment 3 Rex Dieter 2009-01-23 17:46:04 UTC
to be clear, that last comment was intended for the aqsis maintainer(s)

Comment 4 Rex Dieter 2009-01-23 17:57:58 UTC
OK, double-checked, instead of
xdg-desktop-menu --install
use
xdg-desktop-menu forceupdate

I'm pretty sure you want to replace the 
xdg-icon-resource --install
with
install icons during %build, and add to scriptlets:
xdg-icon-resource forceupdate --theme hicolor

too.

Comment 5 Nicolas Chauvet (kwizart) 2009-01-27 00:43:35 UTC

It seems that's shouldn't have trusted upstream when they started to make rpm.
Their needs doesn't really fit ours as they cannot expect some tools to be available while registering the desktop files , icons and the mimetype.
Shoudn't the xdg tools done for that purpose after all ? (to be distro agnostic?)

On the other hand, if it install unowned files in /usr/local, that doesn't worth to use the xdg tools, I will revert back to the well documented %post install scriplet to register the icons and desktop files with the mime-types
(I'm just not sure about xdg-icon-resource equivalent).

Comment 6 Fedora Update System 2009-02-05 02:07:44 UTC
aqsis-1.4.2-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update aqsis'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-1199

Comment 7 Nicolas Chauvet (kwizart) 2009-02-19 10:22:10 UTC
This bug was fix with the above update