| Summary: | www-client/opera: use upstream desktop file instead of ebuild-generated | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
| Component: | New packages | Assignee: | Jeroen Roovers (RETIRED) <jer> |
| Status: | RESOLVED TEST-REQUEST | ||
| Severity: | enhancement | CC: | astralstorm |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Bug Depends on: | |||
| Bug Blocks: | 239107 | ||
| Attachments: |
opera-ebuilds.diff
opera-9.51-add_gentoo4.patch opera-9.51-simplify_desktop.patch opera.ebuild.diff opera-freedesktop.patch |
||
|
Description
Pacho Ramos
2008-01-04 17:19:56 UTC
Created attachment 140089 [details]
opera-ebuilds.diff
Well, seriously... this kind of ad-hoc hacks sucks. Either get opera ship a valid, usable desktop file instead of their home-made heredoc stuff in the install script, or fix eutils to provide such features. (Also makes me wonder who on earth needs a translation for this exactly.) Comment on attachment 140089 [details]
opera-ebuilds.diff
What exactly does "Opera" need to get translated to? In other words, what is going wrong in the first place? What are you seeing in your menu and what would you like it to be?
(I won't apply the patch in its current form.)
It will simply translate comment displayed when you put the mouse over opera icon. This "horrible" ad-hoc hack simply uses translations provided by install.sh that would be used if opera where installed with upstream installer Why is this way as bad? (In reply to comment #4) > It will simply translate comment displayed when you put the mouse over opera > icon. This "horrible" ad-hoc hack simply uses translations Since you failed to answer my previous question, I made some time to have a look myself. From what I see in install.sh, it seems that you want to see "web browser" appear in your language in a tooltip. I sincerely hope that this is what you intended because I'm going to plod on regardless. > provided by install.sh that would be used if opera where installed with > upstream installer Opera *is* installed using the upstream install.sh ... It's just that we heavily modify it before using it. The generate_desktop() function isn't called (since we modify xdg() at line ~1801) because that would cause a sandbox violation in src_install() in the ebuild. > Why is this way as bad? sed and grep are evil - have another look at the Opera ebuilds and what they do to many path variables in install.sh :) Either we use the upstream desktop file or we generate a minimal one of our own. (In reply to comment #5) > (In reply to comment #4) > > It will simply translate comment displayed when you put the mouse over opera > > icon. This "horrible" ad-hoc hack simply uses translations > > Since you failed to answer my previous question, I made some time to have a > look myself. From what I see in install.sh, it seems that you want to see "web > browser" appear in your language in a tooltip. I sincerely hope that this is > what you intended because I'm going to plod on regardless. > Yes, it is :-) > Opera *is* installed using the upstream install.sh ... It's just that we > heavily modify it before using it. The generate_desktop() function isn't called > (since we modify xdg() at line ~1801) because that would cause a sandbox > violation in src_install() in the ebuild. > Ah :-| > > Why is this way as bad? > > sed and grep are evil - have another look at the Opera ebuilds and what they do > to many path variables in install.sh :) > Ah :-/, I viewed sed usage at src_unpack stage and also viewed fgrep usage in other ebuilds, then, I thought that it wasn't bad :-(, sorry The problem is that, with upstream installer, this would only be fixed for KDE, sed -e "s/GenericName/Comment/" is needed for adding "Comment=" entries that are used by gnome instead of GenericName Jer, I have prepared some patches for using upstream installer for this, sorry for the delay but I haven't had enough time until past august Created attachment 164803 [details, diff]
opera-9.51-add_gentoo4.patch
This adapts install script to gentoo, its name includes "9.51" simply because I did it when I had 9.51 installed, but works fine in 9.52 also
Created attachment 164804 [details, diff]
opera-9.51-simplify_desktop.patch
This forces script to use the method we need
Created attachment 164806 [details]
opera.ebuild.diff
This is a diff for ebuild, it includes other changes unrelated to this bug, the needed for this is:
1. Don't apply opera-9.00-install.patch, it's no longer needed
2. Drop all "Install the icons" phase, I don't install .xpm icon because if it's installed in /usr/share/pixmaps, it's used over png icons, and xpm icon looks really ugly at default size and even worse when it's resized
3. Drop "make_desktop_entry"
4. I add a sed command for changing "GenericName" with "comment" when "gnome" USE flag is used, because gnome shows Comment instead of GenericName
Created attachment 164811 [details, diff]
opera-freedesktop.patch
I have just seen with desktop-file-validate that .desktop file provided by opera has a few warnings related with freedesktop specs, attached patch can be applied at first for fixing them
This bug not being fixed causes problems with KDE, where it downloads pages instead of passing the URL to browser. I will create a new bug and add a blocker. *** Bug 239107 has been marked as a duplicate of this bug. *** What I'd like to start doing (soon) is to maintain a single desktop file in ${FILESDIR}, possibly extracted straight from install.sh.
The part causing problems with KDE 4 is Exec line missing %u argument for URL. MimeType entry would be nice to have too. www-client/opera-9.60_pre2440 applies all three of Pacho's patches (alliteration not intended). Please test it and reopen this bug if the reported problems haven't been fixed. It could be days before the rc2 and stable 9.60 are released and I would like to use the patches there too, so please make hast! :) @Pacho: Could you please figure out what sed scripts these patches would allow us to drop? (Maybe open a new bug for any of those.) Seems to work fine with Opera 9.60. |