Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 403139 - Desktop file for Java Control Panel (all versions) is incompatible with icon themes
Summary: Desktop file for Java Control Panel (all versions) is incompatible with icon ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-11 09:03 UTC by Shubhadeep Chaudhuri
Modified: 2012-02-16 12:56 UTC (History)
0 users

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


Attachments
oracle-jdk-bin.patch (oracle-jdk-bin.patch,933 bytes, patch)
2012-02-11 09:03 UTC, Shubhadeep Chaudhuri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shubhadeep Chaudhuri 2012-02-11 09:03:38 UTC
Created attachment 301541 [details, diff]
oracle-jdk-bin.patch

The Java Control Panel desktop entry has absolute value for icon which makes it incompatible with icon-themes.

Packages affected are:
dev-java/sun-jre-bin
dev-java/sun-jdk
dev-java/oracle-jre-bin
dev-java/oracle-jdk-bin

A simple change in the ebuild would fix this.
The attached patch needs to be adjusted for other packages.
Comment 1 Ralph Sennhauser (RETIRED) gentoo-dev 2012-02-11 11:22:34 UTC
doicon takes a list of icons and installs them to /usr/share/pixmaps. With your patch we end up with all VMs installing a file /usr/share/pixmaps/sun-jcontrol.png, which we can't due to file collision.

Also the file /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-control.png only exists when reinstalling and doicon needs a "|| die" even with EAPI 4.
Comment 2 Shubhadeep Chaudhuri 2012-02-12 07:44:48 UTC
Okay, then how about checking if the file exists.

if [[ ! -f /usr/share/pixmaps/sun-jcontrol.png ]]; then
  doicon /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png || die;
fi

Maybe this is overkill for just a couple of icons, so it's totally your call.

(In reply to comment #1)
> Also the file
> /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-control.png only exists
> when reinstalling

So, you mean to say it won't exist for someone who is installing it for the first time.

I'm not an expert on java so I'm asking, why aren't the jdk and jre packages mutually exclusive.
Comment 3 Ralph Sennhauser (RETIRED) gentoo-dev 2012-02-16 12:56:03 UTC
This is fixed for following packages:

* app-emulation/emul-linux-x86-java-1.6.0.31
* dev-java/sun-jdk-1.6.0.31
* dev-java/sun-jre-bin-1.6.0.31
* dev-java/oracle-jdk-bin-1.7.0.3
* dev-java/oracle-jre-bin-1.7.0.3

The icon is now always installed under a custom name and referenced without an absolute path. Also changed the .desktop to be installed with a more standard name, this might require to add it to your gui menus / preferences once more depending on your DE.

An alternative would have been to install a .desktop file with java-config for the jcontrol wrapper. There are other wrappers (like jvisualvm) which might profit but for that we'd need icons which can be shipped with java-config. If you are interested please file a separate bug.