<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>79509</bug_id>
          
          <creation_ts>2005-01-25 13:12 0000</creation_ts>
          <short_desc>recent portage fails to resolve virtuals correctly in context of dev-lang/ghc</short_desc>
          <delta_ts>2005-07-31 04:11:38 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Core - Dependencies</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kosmikus@gentoo.org</reporter>
          <assigned_to>dev-portage@gentoo.org</assigned_to>
          <cc>haskell@gentoo.org</cc>
    
    <cc>sascha-gentoo-bugzilla@silbe.org</cc>

      

      
          <long_desc isprivate="0">
            <who>kosmikus@gentoo.org</who>
            <bug_when>2005-01-25 13:12:20 0000</bug_when>
            <thetext>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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kosmikus@gentoo.org</who>
            <bug_when>2005-01-25 13:55:45 0000</bug_when>
            <thetext>I&apos;ve narrowed this down to the change from -r13 to -r14.

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

ks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jstubbs@gentoo.org</who>
            <bug_when>2005-01-25 15:06:36 0000</bug_when>
            <thetext>Can&apos;t fix this for some time to come. It&apos;s not something that changed between -r13 and -r14. I&apos;m certain that if you try -r4 through -r12, they will all &quot;break&quot; as well. There may be a way around it on either the ebuild side or portage side that doesn&apos;t break &quot;virtuals to be installed don&apos;t block&quot; and &quot;virtuals to be installed can&apos;t satisfy deps&quot;, but I can&apos;t think of it right now.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kosmikus@gentoo.org</who>
            <bug_when>2005-01-25 15:29:07 0000</bug_when>
            <thetext>Ah, sorry, you&apos;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 &quot;virtuals to be
installed can&apos;t satisfy deps&quot;. But isn&apos;t this exactly what&apos;s happening
here? virtual/ghc, still to be installed, is nevertheless used to
satisfy the dep for dev-lang/ghc ...

ks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jstubbs@gentoo.org</who>
            <bug_when>2005-01-25 17:17:14 0000</bug_when>
            <thetext>For reference,
bug #1343
bug #68220
bug #78201
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jstubbs@gentoo.org</who>
            <bug_when>2005-01-27 06:10:53 0000</bug_when>
            <thetext>Created an attachment (id=49655)
Relocates virtuals processing

Relocates virtuals updating to after a package&apos;s deps are parsed &amp; translated
but before they are processed.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kosmikus@gentoo.org</who>
            <bug_when>2005-05-10 15:08:30 0000</bug_when>
            <thetext>I&apos;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=&quot;doc&quot; 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&apos;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=&quot;doc&quot; set. Unfortunately,
I do not see a good workaround currently ...

ks</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jstubbs@gentoo.org</who>
            <bug_when>2005-07-31 04:11:38 0000</bug_when>
            <thetext>This is fixed. The misordering of dependencies in the last comment is due to  
portage&apos;s bad handling of circular dependencies. There&apos;s many bugs open about  
that which I&apos;ll be creating a new bug explaining it all and duping the rest on  
in the next few days.  </thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>49655</attachid>
            <date>2005-01-27 06:10 0000</date>
            <desc>Relocates virtuals processing</desc>
            <filename>emerge-2.0.51-r15-bootstrapping-virtuals.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGVtZXJnZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvdmFyL2N2c3Jvb3QvZ2VudG9vLXNy
Yy9wb3J0YWdlL2Jpbi9lbWVyZ2UsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMzQ1LjIuMTMKZGlm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