Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348046 - www-client/opera-10.63: /usr/bin/opera overwrites OPERA_PERSONALDIR and OPERA_DIR
Summary: www-client/opera-10.63: /usr/bin/opera overwrites OPERA_PERSONALDIR and OPERA...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 16:23 UTC by bugs.gentoo.org
Modified: 2010-12-09 17:28 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 bugs.gentoo.org 2010-12-07 16:23:36 UTC
The wrapper script /usr/bin/opera overwrites the environment variables OPERA_PERSONALDIR and OPERA_DIR. They should only be set if they were unset.

Reproducible: Always

Steps to Reproduce:
1. execute in bash: OPERA_PERSONALDIR=~/opera-test-profile opera
Actual Results:  
Opera uses the profile ${HOME}/.opera

Expected Results:  
Opera should use the profile ~/opera-test-profile

Possible fix:

#!/bin/bash
export OPERA_DIR="${OPERA_DIR="/usr/share/opera"}"
export OPERA_PERSONALDIR="${OPERA_PERSONALDIR="${HOME}/.opera"}"
exec /usr/lib64/opera/opera "$@"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-07 19:08:18 UTC
I see why it would matter to set OPERA_PERSONALDIR, so I am inclined to fix that, but I don't get why /usr/bin/opera should use anything else than the default OPERADIR.
Comment 2 bugs.gentoo.org 2010-12-08 17:08:20 UTC
I just did it for consistency.

It is still possible to change the shared directory using the -sharedir command line option. So I would expect the following two calls behave equally (even if opera fails to start in both cases):

opera -sharedir foobar

OPERA_DIR=foobar opera

But, as you said, in the end there is probably no reason to change the shared directory.

I don't know what's more convenient – just do what you think is better.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-08 17:57:36 UTC
(In reply to comment #2)
> I just did it for consistency.

ok.

> It is still possible to change the shared directory using the -sharedir command
> line option. So I would expect the following two calls behave equally (even if
> opera fails to start in both cases):
> 
> opera -sharedir foobar
> 
> OPERA_DIR=foobar opera

The -pd <dir> option overrides that as well.

> But, as you said, in the end there is probably no reason to change the shared
> directory.

I wonder if setting these defaults in the wrapper script is necessary at all, now.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-09 17:28:25 UTC
OPERA_DIR needs to be set, and I hesitate to set it to anything else than the share dir that is installed with the wrapper script.

However, OPERA_PERSONALDIR now defaults to $HOME/.opera, so I have changed the ebuilds not to set that in the wrapper script any longer.

Thank you for reporting.