Bug 994738 - xdg-mime default command incorrectly assumes kde-config is installed
xdg-mime default command incorrectly assumes kde-config is installed
Status: NEW
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xdg-utils (Show other bugs)
6.4
All Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Alexander Larsson
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 18:42 EDT by Richard Lloyd
Modified: 2017-01-09 11:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
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 Richard Lloyd 2013-08-07 18:42:33 EDT
Description of problem:
xdg-mime (from xdg-utils) can be installed independently of KDE, but the "xdg-mime default" command calls kde-config (from kdelibs3) without first checking if it is installed.

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

How reproducible:
All the time if KDE (specifically kdelibs3) isn't installed.

Steps to Reproduce:
1. Install a KDE-less RHEL 6 (e.g. select GNOME desktop and make sure kdelibs3 isn't installed, which it shouldn't be).
2. If xdg-utils isn't installed, then run "yum install xdg-utils" as root
3. Set Firefox to handle HTML (advisable to do this as non-root user):
   xdg-mime default mozilla-firefox.desktop text/html

Actual results (as a non-root user):
/usr/bin/xdg-mime: line 531: kde-config: command not found
mkdir: cannot create directory `: No such file or directory
/usr/bin/xdg-mime: line 542: /profilerc.new: Permission denied

Expected results:
After running "yum install kdelibs3", the xdg-mime default command runs correctly with no errors.

Additional info:
The make_default_kde() function in /usr/bin/xdg-mime needs to do a check for the existence of /usr/bin/kde-config and do nothing (return) if it's not present. Example code somewhere in the function (e.g. just before the kde-config call):

if [ ! -x /usr/bin/kde-config ]
then
   return
fi
Comment 2 RHEL Product and Program Management 2013-10-13 19:17:07 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

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