Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 98979

Summary: www-client/opera 8.00 and 8.01 install a broken wrapper script
Product: Gentoo Linux Reporter: Adam Chodorowski <adam>
Component: Current packagesAssignee: Heinrich Wendel (RETIRED) <lanius>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Adam Chodorowski 2005-07-14 02:45:22 UTC
The ebuilds for opera 8.00 and 8.01 patches the "opera" wrapper script in a 
broken way, with the result that opera will sometimes try to open of extra URLs 
when you start it. The problem is opera-qt.patch, which doesn't quote variables 
properly:

@@ -195,6 +195,9 @@
     fi
 done
 
+QTSTYLE=$(cat ~/.qt/qtrc | grep style=)
+STYLE=${QTSTYLE:6}
+
 # Running Opera
-eval exec "'${OPERA_BINARYDIR}opera' $passflags"
+eval exec "'${OPERA_BINARYDIR}opera' $passflags -style $STYLE"

On my system, "style" is set to "light, 3rd revision", and with the above patch 
opera will try to open http://3rd and http://revision. A quick fix is to change 
the last line in the patch to:

+eval exec "'${OPERA_BINARYDIR}opera' $passflags -style '$STYLE'"

The patch has other problems to. The user might not have a qtrc file, or the 
file might not contain the style setting. A more correct patch would look like 
this:

@@ -195,6 +195,9 @@
     fi
 done

+if [ -f ~/.qt/qtrc ]; then
+    STYLE="$(grep style= ~/.qt/qtrc | cut -c7-)"
+    if [ ! -z "$STYLE" ]; then
+        STYLE="-style '$STYLE'"  
+    fi
+fi

 # Running Opera
-eval exec "'${OPERA_BINARYDIR}opera' $passflags"
+eval exec "'${OPERA_BINARYDIR}opera' $passflags $STYLE"


Reproducible: Always
Steps to Reproduce:
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2005-08-04 01:32:00 UTC
added for 8.02