Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100278 - || qt dependency from qt3.eclass is flawed
Summary: || qt dependency from qt3.eclass is flawed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 12:51 UTC by Sven Wegener
Modified: 2006-04-16 17:48 UTC (History)
1 user (show)

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 Sven Wegener gentoo-dev 2005-07-25 12:51:48 UTC
Couldn't find any of you on IRC, so I'm filing this bug.

The || (any-of) qt dependencies used by qt3.eclass have a flaw. Don't know if
you use the same syntax in other places, like kde* eclasses. Considering this:

|| ( =x11-libs/qt-3.3.4-r6 =x11-libs/qt-3.3.4-r5 =x11-libs/qt-3.3.4-r4 )

If you have x11-libs/qt-3.3.4-r4 installed portage won't update to -r5 or -r6
even if it's properly keyworded, unless x11-libs/qt is listed in world or there
are packages depending on qt in a broader way.
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2005-07-25 12:57:33 UTC
Hmm, not sure what to think about this.   
 
How can we get around it.  Can this be considered a portage bug?  Is it a bug 
that will provide a problem in the long run?  IE, will emerge -u package work 
to upgrade qt as well in this case?  
 
Comment 2 Sven Wegener gentoo-dev 2005-07-25 13:13:37 UTC
No, portage won't update qt, unless it's listed in world or other packages
depend on qt not using the || syntax from qt3.eclass.

It goes like this: If none of the atoms in the || list matches an installed
version, portage collapses the list to the first available atom. But if one of
the atoms matches an installed version, the complete list is collapsed to that
one atom. In your case, using the = atoms, you only match one ebuild and portage
has no other ebuilds that can be considered for updates.
Comment 3 Sven Wegener gentoo-dev 2005-07-25 13:18:45 UTC
IMHO it's not a portage bug. The || operator is like virtuals. Actually,
virtuals are implemented by replacing the virtual atom with a || list of the
providers. It's an any-of match and not a best-of match.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2005-07-25 13:24:36 UTC
In some instances, the eclass will expand differently: 
 
$(qt_min_version 3.1) == 
 
|| ( =x11-libs/qt-3.3* =x11-libs/qt-3.2* =x11-libs/qt-3.1* ) 
 
 
Maybe we can make the other expansion cases more portage friendly: 
 
$(qt_min_verison 3.2.3-r2) == 
 
|| ( =x11-libs/qt-3.3* =x11-libs/qt-3.2*)  !<x11-libs/qt-3.2.3-r2 
 
I wonder if something like that would work? 
 
Comment 5 Sven Wegener gentoo-dev 2005-07-25 13:35:42 UTC
That only shifts the problem from locking qt at the revision level to the minor
version level, but the same flaw still exists. If 3.2 is installed, but 3.3 isn't,
portage won't consider qt for an update from 3.2 to 3.3.

And depending on a package and also blocking the same package, or some versions
of it may have as a result that users manually have to unmerge and re-emerge
packages to get the blockers resolved.
Comment 6 Caleb Tennis (RETIRED) gentoo-dev 2005-07-25 13:38:11 UTC
Okay, then I don't have any idea on how to solve this one. 
Comment 7 Sven Wegener gentoo-dev 2005-07-25 13:47:55 UTC
Do you want to only match explicitly marked versions with it? Or what's the
purpose of using the || operator?
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2005-07-25 13:50:52 UTC
See our discussion in #97404 and my report of #100235 for the logic behind 
this. 
Comment 9 Gregorio Guidi (RETIRED) gentoo-dev 2005-07-26 06:17:11 UTC
> If you have x11-libs/qt-3.3.4-r4 installed portage won't update to -r5 or  
> -r6 even if it's properly keyworded, unless x11-libs/qt is listed in world 
 
There's a thing I don't understand, how is this different from the normal 
portage behavior? Portage does not upgrade dependencies unless using -uD. 
 
Anyway, if we really cannot get out of this, there's always the Definitive 
Solution (tm): using "=x11-libs/qt-3*" in _every_ ebuild depending on Qt3. 
After all, qt-3.3.3 and qt-3.3.4 are the only qt3 versions in portage, so 
nothing could go really wrong. 
For Qt4, we should be able to find some reasonable solution. 
 
I know it's just like dropping a nuclear weapon on the problem, but hey... 
 
Comment 10 Caleb Tennis (RETIRED) gentoo-dev 2005-07-26 06:25:53 UTC
Well, what *could* go wrong is if a person has qt-3.1 installed and they are 
going to install some package that needs qt-3.3 - with this dep, qt-3.1 
satisfies it. 
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-07-26 06:40:04 UTC
The problem is that portage won't update even if -uD is used when these types 
of DEPEND strings are the only ones to occur. I can't see any other way to do 
it at the moment, however. And I'm definitely one for having the dependency 
correctness rather workarounds that seem better for most users but worse for a 
few others. 
 
For the current portage, I'd say the current way is probably the best. The 
next version will definitely support ranged dependencies, which will supercede 
these DEPENDs altogether. As for how the next version will handle these types 
of DEPENDs... It should be doable if matches against installed packages only 
happen against the atom keys rather than inclusive of versions. 
Comment 12 Caleb Tennis (RETIRED) gentoo-dev 2005-07-26 06:41:40 UTC
In our case, we'll probably survive this as we don't expect many updates to the 
qt-3 packages anymore, save for some bug fixes.  If they become critical, we 
can always force the eclass to cause the user to upgrade to the latest Qt. 
Comment 13 Mark Loeser (RETIRED) gentoo-dev 2006-04-16 17:48:19 UTC
Closing this since it is resolved the best we can for now.