First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 97404
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Qt Bug Alias <qt@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Caleb Tennis <caleb@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 97404 depends on: 100235 Show dependency tree
Bug 97404 blocks:
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: 2005-06-29 09:59 0000
This is where we can pose thoughts and related issues to having both qt3 and  
qt4 installed at the same time.  
  
Right now, it should *just work*.  What we need to do is update portage deps  
to handle this scenario.  Things to fix:  
  
1) ebuilds with deps like ">=x11-libs/qt-3.3.2"  
2) ebuilds that use the need-qt function  
3) ebuilds that call qmake somewhere in the src_compile() function  
  
#3 should be easy.  Change all occurrences of qmake to $QTDIR/qmake, since 
QTDIR is not used in Qt4. 
 
2) Can we deprecate this, and just rely on a straight dependency in the 
ebuild? 
 
1) Change ebuilds to have deps like: "=x11-libs/qt-3.3*" ? 
 
There are problem some fringe cases, but it will probably help to get started 
sooner than later.  Thoughts? 

Reproducible: Always
Steps to Reproduce:

------- Comment #1 From Caleb Tennis 2005-06-29 11:26:13 0000 -------
I assume that portage can handle this: 
 
DEPEND="=x11-libs/qt-3* >=x11-libs/qt-3.3.1".  Maybe just updating the ebuilds 
in portage to use this type of syntax would work? 

------- Comment #2 From Carsten Lohrke 2005-06-29 12:49:26 0000 -------
>I assume that portage can handle this:
>DEPEND="=x11-libs/qt-3* >=x11-libs/qt-3.3.1". 

Iirc it doesn't. This would need general support for ranges.


>1) ebuilds with deps like ">=x11-libs/qt-3.3.2"  

Can be changed to <qt-4. The portage tree is not a snapshot. Users have to adapt. ;)


>2) ebuilds that use the need-qt function  
>3) ebuilds that call qmake somewhere in the src_compile() function

There are a number of things needed to improve regarding kde* eclasses

1. Switching from need-foo() to NEED_FOO="bar" to comply with  GLEP 33
2. Dealing of qmake/.pro issues inside an eclass, instead reinventing the whell
with every qt related ebuild.
3. Proper support of application which can be build against Qt or KDE inside eclass.
4. support scons build scripts via eclass
5. _Not_ building against the latest available kde version, but against
kde-config --prefix or user defined one (e.g. reusing KDEDIR for this purpose),
similiar approach needed for Qt as well
6. may have missed something


>2) Can we deprecate this, and just rely on a straight dependency in the 
ebuild? 

There are two ways to deprecate it: Turn it into a variable (to be set before
inherit) or explicitly setting the needed dependency/ies in every ebuild.

------- Comment #3 From Caleb Tennis 2005-06-29 13:03:02 0000 -------
Ooh, my brain was going crazy when I suddenly thought of a way that we might be 
able to make all of this a LOT easier! 

Why not name the package "qt4" ? 

Okay, it's a hack, but it might make things a lot easier... 

------- Comment #4 From Caleb Tennis 2005-06-29 13:22:56 0000 -------
Barring that, what about this: 
 
Any ebuild that currently has something like this: 
 
>=x11-libs/qt-3 
 
Change to  
 
=x11-libs/qt-3 
 
Easy. 
 
 
For more interesting cases, create a qt3.eclass which creates: 
 
QT3VERSIONS="|| ( qt-3.0.1-r1 qt-3.0.1-r2 qt-3.0.1-r3 ... qt-3.3.4-r5 )" 
 
and then in an ebuild: 
 
DEPEND="$QT3VERSIONS" 
 
And we can create some eclass function to dynamically create QT3VERSIONS based 
on what you tell it: 
 
DEPEND="$(qt3_version_min 3.1)"  
 
or something like that... 

------- Comment #5 From Caleb Tennis 2005-06-30 06:26:15 0000 -------
I've committed qt.eclass which is an initial handler for ebuilds which need Qt. 

The stuff in the ebuild itself is a bit of a hack (could be much prettier), but 
in a nutshell, an ebuild should be able to: 

inherit qt 

DEPEND="$(qt3_min_version 3.0)" 

and it should just work (it does so by expanding out all of the known version 
of Qt which would work: 

IE: 

DEPEND="||(x11-libs/qt-3.3.4-r5 x11-libs/qt-3.3.4-r4 ... x11-libs/qt-3.3.0)" 

As a special case, if a user specifies 3, 3.0, or 3.0.0, then it expands to: 

DEPEND="|| ( x11-libs/qt-3* )" 

Thoughts? 

------- Comment #6 From Caleb Tennis 2005-06-30 06:35:48 0000 -------
I also put in a qt_pkg_setup function which handles the setting of QTDIR, so I 
believe that other than a possible 'addwrite' the qt eclass can replace the use 
of need-qt and set-qtdir in kde-functions.eclass. 

------- Comment #7 From Caleb Tennis 2005-07-06 22:16:03 0000 -------
I've gone through portage and updated all of the *easy* ebuilds (those who had 
>=x11-libs/qt-3.0.0 -> =x11-libs/qt-3* ). 
 
 

------- Comment #8 From Caleb Tennis 2005-07-07 08:11:04 0000 -------
So KDE team, did we ever come to a consensus on how to handle this?  Nobody 
seemed to really liked my $(qt_min_version) idea via the eclass. 
 
I've fixed most of the easy cases in portage now, but how to handle, for 
example: 
 
>=x11-libs/qt-3.3.3 
 
I have renamed qt.eclass to qt3.eclass and I believe we can tell people to 
prefer using it over kde-functions/need-qt.  Basically, set the depend for Qt 
explicitly within the ebuild, and the pkg_setup should handle setting QTDIR up 
for the user. 
 
I'd like to go ahead and start getting the ebuilds in portage fixed with this 
new scheme, but I want to make sure I don't have any problems with it before 
the transition starts... 

------- Comment #9 From Gregorio Guidi (RETIRED) 2005-07-08 02:09:07 0000 -------
To summarize:  
  
If an ebuilds uses kde-functions and need-qt(), it is changed to inherit qt3  
instead and in *DEPEND it gets =x11-libs/qt-3*, if appropriate, or 
$(qt_min_version 3.x.y) if needed. 
 
If an ebuild uses kde-functions and set-qtdir(), it is changed to inherit qt3 
and the qt versions in *DEPEND are changed in the same way. 
 
If an ebuild does not use kde-functions, the qt versions in *DEPEND are 
changed to =x11-libs/qt-3*, if appropriate, or it is changed to inherit qt3 
and do $(qt_min_version 3.x.y), if needed. 
 
Right? 
That's ok for me, in case. 

------- Comment #10 From Caleb Tennis 2005-07-10 18:32:23 0000 -------
Sounds good.  I think I'll open a new bug in the next few days to this regard
and see if we can't get people 
to start using the qt3.eclass

------- Comment #11 From Gregorio Guidi (RETIRED) 2005-07-12 00:47:42 0000 -------
I found a little problem: addwrite/addpredict do not work in pkg_setup, they 
must be in global scope or in a specific src_*. 
 
Maybe we can remove the has_version and move everything in pkg_setup() in 
global scope? 
 

------- Comment #12 From Gregorio Guidi (RETIRED) 2005-07-13 07:11:03 0000 -------
I committed the change to qt3.eclass as explained in previous comment. 

------- Comment #13 From Caleb Tennis 2005-12-17 08:22:35 0000 -------
Closing as fixed.

First Last Prev Next    No search results available      Search page      Enter new bug