Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98979 - www-client/opera 8.00 and 8.01 install a broken wrapper script
Summary: www-client/opera 8.00 and 8.01 install a broken wrapper script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Heinrich Wendel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-14 02:45 UTC by Adam Chodorowski
Modified: 2005-08-04 01:32 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 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