Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203955 - qt4.eclass: Incorrect syntax
Summary: qt4.eclass: Incorrect syntax
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Qt Bug Alias
URL: http://sources.gentoo.org/viewcvs.py/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-01 03:08 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2008-01-05 22:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch (qt4.eclass.patch,1.10 KB, patch)
2008-01-05 18:33 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-01-01 03:08:13 UTC
Inside [ ] you cannot correctly check return values of commands.

Use:
if ! has_version x11-libs/qt-core || ! built_with_use x11-libs/qt-core ssl ;
...
if ! has_version x11-libs/qt-sql || ! built_with_use x11-libs/qt-sql sqlite ;


Also consistently use [[ ]] instead of [ ] when checking variables:
elif [[ ${x} == ssl ]]; then
...
elif [[ ${x} == sqlite3 ]]; then


(Also note that [ ] uses -a / -o instead of && / ||.)
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2008-01-01 20:47:52 UTC
I won't be able to fix until tomorrow, so if someone can stab it before then feel free.
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2008-01-05 18:04:06 UTC
do you have a patch you can supply on fixing this?
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-01-05 18:33:23 UTC
Created attachment 140215 [details, diff]
Patch
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2008-01-05 18:44:44 UTC
thanks a bunch, just committed.
Comment 5 imgvg 2008-01-05 21:07:37 UTC
The patch has an error in it.  The last updated line has "\ instead of \" immediately before the word sqlite, resulting in syntax errors.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-01-05 21:17:27 UTC
(In reply to comment #5)
> The patch has an error in it.

No. The attached patch was correct.
Somebody introduced this error after application of this patch.

> The last updated line has "\ instead of \"
> immediately before the word sqlite, resulting in syntax errors.

Somebody fixed it:
http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?r1=1.32&r2=1.33&sortby=date
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-01-05 21:23:52 UTC
I'm reading http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?r1=1.31&r2=1.33&sortby=date&diff_format=u and I see another mistake.

My patch contained:
	die "Install x11-libs/qt-core with USE=\"ssl\""

But Caleb Tennis committed:
	die "Install x1-libs/qt-core with USE=\"ssl\""

I think that it should be fixed.
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2008-01-05 22:40:46 UTC
sorry ,was working via a shell window on a remote machine and I suppose that's what happens when you type faster than the connection would handle :)