Bug 481352 - xdg-desktop-menu installs in /usr/local/share/applications
xdg-desktop-menu installs in /usr/local/share/applications
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: aqsis (Show other bugs)
10
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Nicolas Chauvet (kwizart)
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-23 12:30 EST by Jerry James
Modified: 2009-02-19 05:22 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-19 05:22:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jerry James 2009-01-23 12:30:46 EST
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 12:40:38 EST
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 12:44:54 EST
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 12:46:04 EST
to be clear, that last comment was intended for the aqsis maintainer(s)
Comment 4 Rex Dieter 2009-01-23 12:57:58 EST
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-26 19:43:35 EST

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-04 21:07:44 EST
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 05:22:10 EST
This bug was fix with the above update

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