Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | update-desktop-database not found | ||
---|---|---|---|
Product: | Installation | Reporter: | rvojta |
Component: | code | Assignee: | AOO issues mailing list <issues> |
Status: | CONFIRMED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, nospam4obr |
Version: | 680m92 | Keywords: | oooqa |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux, all | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
rvojta
2005-04-13 17:59:40 UTC
Hmm, where does 'which' take it's information from ? Strange enought that SuSE places update-desktop-database to /opt/gnome/bin .. The problem is in the PATH variable which is used during RPM package installation. RPM's PATH variable contains: /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin But the 'normal' PATH in the console contains: /home/robert/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin AFAIK which is looking in the PATH, so, the which in the console will find the 'update-desktop-database', but which triggered from the RPM is not able to find it because of different PATH The PATH (for the console) is enhanced with this part of the /etc/profile: for dir in /var/lib/dosemu \ /usr/games \ /opt/bin \ /opt/gnome/bin \ /opt/kde3/bin \ /opt/kde2/bin \ /opt/kde/bin \ /usr/openwin/bin \ /opt/cross/bin do test -d $dir && PATH=$PATH:$dir done *** Issue 47429 has been marked as a duplicate of this issue. *** of @ cloph: Please have a look, AFAIK this is your package. Probably invalid/wontfix. The freedesktop-spec doesn't hardcode the path to update-desktop-database. The command run looks like this: if (which update-desktop-database); then update-desktop-database /usr/share/applications fi So it relies on the executable to reside in rpm's _install_script_path It is not feasable to check for every possible location and a hint like "add the path to update-desktop-database to rpm's searchpath (_install_script_path)" would not be understood by the casual user. The advanced user will know what to do in this case: have a look at the script (what should be run and how) and then run the command manually. Esp. since SuSE has a dedicated package, it is (IMHO) not worth "fixing" this for SuSE's packaging (=location) of update-desktop-database.. If you have a concrete suggestion please comment, otherwise I'll just close as wontfix. PS: $ which update-desktop-database /opt/gnome2/bin/update-desktop-database I'm not sure if this is invalid/wontfix candidate. Maybe the problem is elsewhere. Where does the `rpm` (the script) takes the `PATH` variable? When I run (as an ordinary user or root) the `which update-desktop-database`, the correct path is returned - /opt/gnome/bin/update-desktop-database. robert@echelon:~> which update-desktop-database /opt/gnome/bin/update-desktop-database robert@echelon:~> But when I run the which command in the RPM package script, it fails. So, maybe SuSE has broken RPM? I agree that it's not possible to test every possible path in RPM script. From this point of view, the RPM script should use the system settings and this is not working. The question is simple - should the RPM script from the RPM package use the system PATH settings? If yes, the problem is in the SuSE RPM tool. If not, you have the update-desktop-database in the /opt/gnome2 directory. So, have you modified PATH variable in the RPM settings or how it works on your system? > Where does the `rpm` (the script) takes the `PATH` variable? From rpm's configuration. rpm --showrc | grep install_script_path > But when I run the which command in the RPM package script, it fails. > So, maybe SuSE has broken RPM? There is room for interpretation on whether has a broken rpm or not. It surely is not broken as "not working properly". You can argue whether SuSE put the update-desktop-database program to /usr/bin (IMHO it should, since it is used to create the cache for the desktop files following the freedesktop specs. As these are put into XDG_DATA_DIRS (default to /usr/share/ and /usr/local/share) it should be put in /usr/bin - it is not a vendor(gnome) specific thing. It it was gnome-specific one can argue that every gnome application should call that program with full path (or %{_bindir}/program ) - but as you cannot put this policy on every package that wants to install a .desktop file this is not feasable. > From this point of view, the RPM script should use the system settings and > this is not working. This is not the way rpm works. > The question is simple - should the RPM script from the RPM package use > the system PATH settings? If yes, the problem is in the SuSE RPM tool. No, it uses rpm's PATH-settings. You can argue about whether SuSE include these directories by default or not, but it is beyond the cope of the individual package. Does SuSE have a policy on how to install & register .desktop files? > If not, you have the update-desktop-database in the /opt/gnome2 directory. > So, have you modified PATH variable in the RPM settings or how it > works on your system? Yes. root's ~/.rpmmacros contains: %_install_script_path /sbin:/bin:/usr/sbin:/opt/gnome2/bin:/usr/bin:/usr/X11R6/bin Reset assigne to the default "issues@openoffice.apache.org". |