Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 229193
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Qt Bug Alias <qt@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Vladimir <civil.over@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
qt4.eclass.diff patch for qt4.eclass patch Vladimir 2008-06-24 11:15 0000 639 bytes Details | Diff
qt4.eclass.patch New patch. patch Vladimir 2008-06-26 15:47 0000 3.40 KB Details | Diff
qt4.eclass.patch Oops. Forgot one thing. patch Vladimir 2008-06-26 16:16 0000 3.49 KB Details | Diff
qt4.eclass.patch One typo fix, a bit better output. patch Vladimir 2008-06-26 16:23 0000 3.91 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 229193 depends on: Show dependency tree
Bug 229193 blocks: 217161
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-06-24 11:15 0000
So it is a bit wrong to do workaround in ebuilds.

------- Comment #1 From Vladimir 2008-06-24 11:15:49 0000 -------
Created an attachment (id=158197) [details]
patch for qt4.eclass

------- Comment #2 From Vladimir 2008-06-26 15:47:25 0000 -------
Created an attachment (id=158519) [details]
New patch.

I've found out that qt4.eclass's QT4_OPTIONAL_BUILT_WITH_USE_CHECK doesn't know
how to handle qt-4.4. I don't think it is needed to create new bug for that,
becouse they are related. So I'm attaching new patch for it. It's one of
possible ways (in my opinion) to teach QT4_OPTIONAL_BUILT_WITH_USE_CHECK to
handle qt-4.4 properly.

------- Comment #3 From Vladimir 2008-06-26 16:16:04 0000 -------
Created an attachment (id=158521) [details]
Oops. Forgot one thing.

------- Comment #4 From Vladimir 2008-06-26 16:17:38 0000 -------
(From update of attachment 158521 [details])
><HTML><HEAD/><BODY><PRE>--- /usr/portage/eclass/qt4.eclass	2008-06-21 19:36:00.000000000 +0400
>+++ /usr/local/portage/eclass/qt4.eclass	2008-06-26 20:09:14.000000000 +0400
>@@ -95,8 +95,8 @@
> 		# The use flags are different in 4.4 and above, and it's a split package, so this is used to catch
> 		# the various use flag combos specified in the ebuilds to make sure we don't error out.
> 
>-			if [[ ${x} == zlib || ${x} == png ]]; then
>-				# Qt 4.4+ is built with zlib and png by default, so the use flags aren't needed
>+			if [[ ${x} == zlib || ${x} == png || ${x} == gif ]]; then
>+				# Qt 4.4+ is built with zlib, gif and png by default, so the use flags aren't needed
> 				continue;
> 			elif [[ ${x} == opengl || ${x} == dbus || ${x} == qt3support ]]; then
> 				# Make sure the qt-${x} package has been already installed
>@@ -122,12 +122,43 @@
> 	done
> 
> 	local optionalflags=""
>+	local optionalerrormessage=""
> 	for x in ${QT4_OPTIONAL_BUILT_WITH_USE_CHECK}; do
>-		if use ${x} &amp;&amp; ! built_with_use =x11-libs/qt-4* ${x}; then
>-			optionalflags="${optionalflags} ${x}"
>-		fi
>+		if use ${x}; then
>+			if [[ "${QT4_MINOR_VERSION}" -ge 4 ]]; then
>+			# The use flags are different in 4.4 and above, and it's a split package, so this is used to catch
>+			# the various use flag combos specified in the ebuilds to make sure we don't error out.
>+
>+				if [[ ${x} == zlib || ${x} == png || ${x} == gif ]]; then
>+					# Qt 4.4+ is built with zlib, gif and png by default, so the use flags aren't needed
>+					continue;
>+				elif [[ ${x} == opengl || ${x} == dbus || ${x} == qt3support ]]; then
>+				# Make sure the qt-${x} package has been already installed
>+
>+					if ! has_version x11-libs/qt-${x}; then
>+						optionalerrormessage="${optionalerrormessage} install the x11-libs/qt-${x} package."
>+						continue;
>+					fi
>+				elif [[ ${x} == ssl ]]; then
>+					if ! has_version x11-libs/qt-core || ! built_with_use x11-libs/qt-core ssl; then
>+						optionalerrormessage="${optionalerrormessage} install the x11-libs/qt-core package with the ssl flag enabled."
>+						continue;
>+					fi
>+				elif [[ ${x} == sqlite3 ]]; then
>+					if ! has_version x11-libs/qt-sql || ! built_with_use x11-libs/qt-sql sqlite; then
>+						optionalerrormessage="${optionalerrormessage} install the x11-libs/qt-sql package with the sqlite flag enabled."
>+						continue;
>+					fi
>+				fi
>+			elif ! built_with_use =x11-libs/qt-4* ${x}; then
>+				optionalflags="${optionalflags} ${x}"
>+			fi
>+		fi
> 	done
> 
>+	if [ "${optionalflags}" != "" ]; then 
>+		optionalerrormessage="${optionalerrormessage} recompile qt4 with \"${optionalflags}\" USE flag(s)"
>+	fi
>+
> 	local diemessage=""
> 	if [[ ${requiredflags} != "" ]]; then
> 		eerror
>@@ -136,7 +167,7 @@
> 		eerror
> 		diemessage="(1) recompile qt4 with \"${requiredflags}\" USE flag(s) ; "
> 	fi
>-	if [[ ${optionalflags} != "" ]]; then
>+	if [[ ${optionalerrormessage} != "" ]]; then
> 		eerror
> 		eerror "(2) You are trying to compile ${CATEGORY}/${PN} package with"
> 		eerror "USE=\"${optionalflags}\""
>@@ -145,9 +176,9 @@
> 		eerror
> 		eerror "Possible solutions to this problem are:"
> 		eerror "a) install package ${CATEGORY}/${PN} without \"${optionalflags}\" USE flag(s)"
>-		eerror "b) re-emerge qt4 with \"${optionalflags}\" USE flag(s)"
>+		eerror "b) ${optionalerrormessage}"
> 		eerror
>-		diemessage="${diemessage}(2) recompile qt4 with \"${optionalflags}\" USE flag(s) or disable them for ${PN} package\n"
>+		diemessage="${diemessage}(2) ${optionalerrormessage} or disable them for ${PN} package\n"
> 	fi
> 
> 	[[ ${diemessage} != "" ]] &amp;&amp; die "can't emerge ${CATEGORY}/${PN}: ${diemessage}"
></PRE></BODY></HTML>

------- Comment #5 From Vladimir 2008-06-26 16:23:29 0000 -------
Created an attachment (id=158523) [details]
One typo fix, a bit better output.

Sorry for previos comment... I thought I can edit patch... Reuploaded patch.
Previous one didn't have one "fi"...

------- Comment #6 From Vladimir 2008-07-14 11:06:26 0000 -------
I've seen that part of fixes made their way to portage (gif support), but what
about broken QT4_OPTIONAL_BUILT_WITH_USE_CHECK ?

------- Comment #7 From Bo Ørsted Andresen (RETIRED) 2008-07-17 00:12:51 0000 -------
I looked at the code and concluded that the logic was completely wrong so I've
added a very different patch which should fix this bug too:

"zlin * gentoo-x86/eclass/qt4.eclass: Try to handle all flags in
QT4{,_OPTIONAL}_BUILT_WITH_USE properly for split qt to avoid duplicating the
same code in pkg_setup in lots of ebuilds. See bugs #217161 and #229193."

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/qt4.eclass?r1=1.43&r2=1.44

Please reopen if you find any bugs with this patch.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug