Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 122758 - hplip: .desktop file is created even when target program isn't
Summary: hplip: .desktop file is created even when target program isn't
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-13 21:54 UTC by Darcy
Modified: 2006-02-14 08:40 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darcy 2006-02-13 21:54:57 UTC
Steps:
1. Emerge hplip with -qt.
2. Select Applications|Accessories|HP Device Manager in Gnome

Result:
Error: Cannot launch entry

This problem exists in hplip-0.9.7-r3 and hplip-0.9.8-r1.

The .desktop file runs /usr/share/hplip/toolbox, but this file doesn't exist when the qt use flag is disabled.  In this case, the .desktop file shouldn't be installed.

Suggested patch:

@@ -112,6 +113,8 @@
                make DESTDIR="${D}" install || die
        fi

-       dodir /usr/share/applications
-       mv "${D}"/usr/share/hplip/data/hplip.desktop "${D}"/usr/share/applications
+       if use qt; then
+               dodir /usr/share/applications
+               mv "${D}"/usr/share/hplip/data/hplip.desktop "${D}"/usr/share/applications
+       fi
 }

In the -qt case, the .desktop file could be removed from /usr/share/hplip/data:

@@ -90,6 +90,7 @@
                rm -f "${D}"/usr/bin/hp-toolbox
                rm -f "${D}"/usr/share/hplip/print
                rm -f "${D}"/usr/share/hplip/toolbox
+               rm -f "${D}"/usr/share/hplip/data/hplip.desktop
        fi

        if use ppds; then
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2006-02-14 08:17:21 UTC
I am fine with removing this entry for -qt, but is there any reason that you want to both install it conditionally and remove it?
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2006-02-14 08:18:13 UTC
Never mind.
Comment 3 Marcelo Goes (RETIRED) gentoo-dev 2006-02-14 08:40:40 UTC
Thanks, fixed in cvs.
I'm not doing a revbump because most people will not want to re-compile to have a desktop entry removed... :-)

Cheers