Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79509 - recent portage fails to resolve virtuals correctly in context of dev-lang/ghc
Summary: recent portage fails to resolve virtuals correctly in context of dev-lang/ghc
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-25 13:12 UTC by Andres Loeh (RETIRED)
Modified: 2005-07-31 04:11 UTC (History)
2 users (show)

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


Attachments
Relocates virtuals processing (emerge-2.0.51-r15-bootstrapping-virtuals.patch,1.87 KB, patch)
2005-01-27 06:10 UTC, Jason Stubbs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Loeh (RETIRED) gentoo-dev 2005-01-25 13:12:20 UTC
The situation is the following: dev-lang/ghc and dev-lang/ghc-bin both
provide virtuals/ghc. In addition, dev-lang/ghc depends on virtuals/ghc,
and virtuals/ghc defaults to dev-lang/ghc-bin. This should cause ghc
to bootstrap off ghc-bin on first installation, and it used to work fine
until at least portage-2.0.51-r2 (the 2004.3 version).

# emerge --version
Portage 2.0.51-r2 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.3-gentoo-r1 i686)
# emerge -p ghc   

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] media-libs/libpng-1.2.7-r1  
[ebuild  N    ] x11-base/opengl-update-2.0_pre4-r1  
[ebuild  N    ] media-libs/freetype-2.1.5-r1  
[ebuild  N    ] x11-misc/ttmkfdir-3.0.9-r2  
[ebuild  N    ] media-libs/fontconfig-2.2.3  
[ebuild  N    ] x11-base/xorg-x11-6.8.0-r4  
[ebuild  N    ] app-arch/rpm2targz-9.0-r2  
[ebuild  N    ] sys-apps/utempter-0.5.5.5-r1  
[ebuild  N    ] x11-terms/xterm-197  
[ebuild  N    ] dev-libs/gmp-4.1.4  
[ebuild  N    ] media-libs/glut-3.7.1  
[ebuild  N    ] dev-lang/ghc-bin-6.2  
[ebuild  N    ] dev-lang/ghc-6.2.2  

 

When I tested today with portage-2.0.51-r15, the same thing failed:

# emerge --version
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.3-gentoo-r1 i686)
# emerge -p ghc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] media-libs/libpng-1.2.7-r1  
[ebuild  N    ] x11-base/opengl-update-2.0_pre4-r1  
[ebuild  N    ] media-libs/freetype-2.1.5-r1  
[ebuild  N    ] x11-misc/ttmkfdir-3.0.9-r2  
[ebuild  N    ] media-libs/fontconfig-2.2.3  
[ebuild  N    ] x11-base/xorg-x11-6.8.0-r4  
[ebuild  N    ] app-arch/rpm2targz-9.0-r2  
[ebuild  N    ] sys-apps/utempter-0.5.5.5-r1  
[ebuild  N    ] x11-terms/xterm-197  
[ebuild  N    ] dev-libs/gmp-4.1.4  
[ebuild  N    ] media-libs/glut-3.7.1  
[ebuild  N    ] dev-lang/ghc-6.2.2  



I would expect this to work as before.

Cheers,
  ks
Comment 1 Andres Loeh (RETIRED) gentoo-dev 2005-01-25 13:55:45 UTC
I've narrowed this down to the change from -r13 to -r14.

After discussing the situation with carpaski on irc, the agreement is:
- he'll look into this soon
- as a temporary solution, I'll modify the dev-lang/ghc ebuild to produce
  an informative error message ("emerge ghc-bin manually") rather than to
  fail during compilation because the necessary dependencies aren't installed.

ks
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2005-01-25 15:06:36 UTC
Can't fix this for some time to come. It's not something that changed between -r13 and -r14. I'm certain that if you try -r4 through -r12, they will all "break" as well. There may be a way around it on either the ebuild side or portage side that doesn't break "virtuals to be installed don't block" and "virtuals to be installed can't satisfy deps", but I can't think of it right now.
Comment 3 Andres Loeh (RETIRED) gentoo-dev 2005-01-25 15:29:07 UTC
Ah, sorry, you're right. At least -r10 to -r12 fail as well. Only -r13
happens to work for some reason (which is why I thought it was introduced
by -r14 ...).

You say one of the things to watch out for is that "virtuals to be
installed can't satisfy deps". But isn't this exactly what's happening
here? virtual/ghc, still to be installed, is nevertheless used to
satisfy the dep for dev-lang/ghc ...

ks
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-01-25 17:17:14 UTC
For reference,
bug #1343
bug #68220
bug #78201
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-01-27 06:10:53 UTC
Created attachment 49655 [details, diff]
Relocates virtuals processing

Relocates virtuals updating to after a package's deps are parsed & translated
but before they are processed.
Comment 6 Andres Loeh (RETIRED) gentoo-dev 2005-05-10 15:08:30 UTC
I'm not sure in how far this is related to the original bug, but since
this is still open:

on a system without dev-haskell/haddock, dev-ghc, and ghc-bin, I get
the following with portage-2.5.51.{19,21}:

$ USE="doc" emerge -pv ghc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] app-text/opensp-1.5.1  +nls 1,385 kB 
[ebuild  N    ] app-text/openjade-1.3.2-r1  -debug 873 kB 
[ebuild  N    ] app-text/docbook-dsssl-stylesheets-1.77-r2  385 kB 
[ebuild  N    ] dev-haskell/haddock-0.6-r3  +doc -tetex 419 kB 
[ebuild  N    ] dev-lang/ghc-bin-6.2  13,150 kB 
[ebuild  N    ] dev-lang/ghc-6.2.2  -debug +doc +opengl -tetex 5,279 kB 

Total size of downloads: 21,495 kB

This is clearly wrong. ghc-bin and ghc are the only two packages that
provide virtual/ghc, and haddock depends on virtual/ghc. Emerging haddock
before any of the two others fails. 

ghc depends on haddock.
ghc-bin does not.

I don't know why portage insists to emerge haddock before ghc-bin ...
This is a real problem, because it will occur for anyone who tries to
install ghc for the first time and has USE="doc" set. Unfortunately,
I do not see a good workaround currently ...

ks
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-07-31 04:11:38 UTC
This is fixed. The misordering of dependencies in the last comment is due to  
portage's bad handling of circular dependencies. There's many bugs open about  
that which I'll be creating a new bug explaining it all and duping the rest on  
in the next few days.