Currently, opera ebuild generates desktop files with "make_desktop_entry", but, with this way, desktop file is generated without translations With the attached diff to be applied to current ebuild, this is fixed Thanks a lot Portage 2.1.3.19 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-tuxonice-r5 i686) ================================================================= System uname: 2.6.23-tuxonice-r5 i686 Genuine Intel(R) CPU T2300 @ 1.66GHz Timestamp of tree: Fri, 04 Jan 2008 15:46:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.10-r5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer -mfpmath=sse -msse3" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer -mfpmath=sse -msse3" DISTDIR="/usr/distfiles" FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ " LANG="es_ES.UTF-8" LC_ALL="es_ES.UTF-8" LINGUAS="es es_ES en_US" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi aim alsa ape asf audiofile avahi avi bash-completion bcmath beagle bitmap-fonts bonobo bzip2 bzlib cairo caps cdb cddb cdparanoia cdr cdrparanoia cli cpdflib cracklib cross crypt css cups curl curlwrappers daap dbus divx4linux djvu dts dv dvb dvd dvdr dvdread dvi eds emerald encode escreen evo exif fam fbcon fbsplash ffmpeg firefox flac foomaticdb fortran ftp galago gb gcj gd gif gimp gimpprint glitz glut glx gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal hddtemp iconv imagemagick imlib ipv6 isdnlog jabber jack java jikes jpeg kde kdeenablefinal kdehiddenvisibility latex lcms lesstif libnotify lm_sensors logrotate mac mad mbox midi mikmod mime ming mmap mmx mmxext mng modplug mono motif mp3 mpeg mpi mplayer mudflap musepack musicbrainz nas ncurses nethack nls nocd nptl nptlonly nsplugin ntfs nvidia ogg oggvorbis openal opengl openmp opnegl pam pcmcia pcre pdf pdflib perl pic png pnp posix ppds pppd python qt qt3 qt4 quicktime readline real reflection reiserfs rpm rtc ruby scanner sdl seamonkey session slang slp smp sndfile sockets socks5 speex spell spl sse sse2 sse3 ssl startup-notification svg syslog tcltk tcpd tetex tga theora threads tiff timidity tk truetype truetype-fonts trusted type1-fonts unicode usb userlocales v4l v4l2 vcd videos vim vorbis wifi win32codecs wma wmf wxwindows x86 xattr xcomposite xine xml xorg xpm xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" DVB_CARDS=" " ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always
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.