Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180045 - PDEPEND should be installed as early as possible
Summary: PDEPEND should be installed as early as possible
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 183511 183513 (view as bug list)
Depends on:
Blocks: 155723 181949 187293
  Show dependency tree
 
Reported: 2007-05-27 19:45 UTC by Donnie Berkholz (RETIRED)
Modified: 2008-10-12 09:05 UTC (History)
9 users (show)

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


Attachments
try to merge PDEPEND as soon as possible so that it behaves more like RDEPEND (pdepend.patch,3.64 KB, patch)
2007-07-01 07:57 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Donnie Berkholz (RETIRED) gentoo-dev 2007-05-27 19:45:36 UTC
I was installing kde-meta and I kept getting failures for things missing libkdnssd. kdelibs has a PDEPEND on kdnssd-avahi when USE=avahi, but I don't think it's guaranteed that PDEPEND is pulled in immediately after kdelibs, just at any point before the end of the emerge. So it could fail to get pulled in by the time other kde* packages require it.

It might be a good idea to change that PDEPEND to an RDEPEND in a different package.
Comment 1 MG 2007-05-28 09:41:42 UTC
I ve had the same problem. Ksysguard failed to compile, missing the ssd library. I ve ran "emerge -pv kdelibs" to check the USE flags and I realize that kdnssd-avahi was not compiled yet (marked as New) but was scheduled to be compiled AFTER kdelibs. The problem was it hasn't been compiled just after kdelibs but was scheduled to be compiled after Ksysguard.

Emerging kdnssd-avahi with the oneshot flag manually before continuing the upgrade solved the problem.
Comment 2 Joseph 2007-05-31 03:59:20 UTC
I had the same problem too. Whilst doing an emerge update that included upgrading to kde 3.5.7. I had also added "avahi" to use flags. 
kdnssd-avahi was put at the bottom of the list and errorred when merging kdnssd. I emerged kdnssd-avahi manually and then tried emerge -uD world again.... It worked.
Comment 3 Matt Summers (RETIRED) gentoo-dev 2007-06-25 21:12:53 UTC
Confirm this bug on stable amd64 kde 3.5.5.  Emerge of kde-meta failed on libkdegames of all places.  LOL.  Solved by emerging kdnssd-avahi manually as previously stated.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 12:58:11 UTC
*** Bug 183513 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 12:58:58 UTC
*** Bug 183511 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 13:40:20 UTC
(In reply to comment #0)
> It might be a good idea to change that PDEPEND to an RDEPEND in a different
> package.

Which one that should be (considering that it must not depend on kdelibs)??? And on that note, what's kdelibs even doing here?

<snip>        
        if ! use avahi; then
                myconf="${myconf} --enable-dnssd"
        else
                myconf="${myconf} --disable-dnssd"
        fi

...

   # Get rid of the disabled version of the kdnsd libraries
    if use avahi; then
            rm -rf "${D}/${PREFIX}"/$(get_libdir)/libkdnssd.*
    fi
</snip>

So, it doesn't actually respect --disable-dnssd? And it doesn't actually need mDNSResponder to built that functionality? Well, in that case why are we deleting the libs when it obviously breaks other stuff?
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2007-06-28 14:29:35 UTC
(In reply to comment #0)
> I was installing kde-meta and I kept getting failures for things missing
> libkdnssd. kdelibs has a PDEPEND on kdnssd-avahi when USE=avahi, but I don't
> think it's guaranteed that PDEPEND is pulled in immediately after kdelibs, just
> at any point before the end of the emerge. So it could fail to get pulled in by
> the time other kde* packages require it.

I'd say this is a Portage dependency resolution problem. Giving it at Portage team wrt this possibility, otherwise it's a local issue (e.g. building with --nodeps) or invalid.


> It might be a good idea to change that PDEPEND to an RDEPEND in a different
> package.
 
Not possible, since kdnssd-avahi depends on kdelibs and Portage builds runtime dependencies before (and even if after, we'd run into the same problem as with PDEPEND. That said, fixing this (installing RDPENDs "directly" afterwards (speak: caring for the correct order the packages are built), we wouldn't need PDEPEND at all).



And guys, please don't come with 3.5.5, we know it's broken. Also sidestepping Portage's dependency resolution e.g. using --nodeps or package.provided, is your private problem.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 14:34:43 UTC
(In reply to comment #7)

carlo - you failed to address Comment #6 completely; what's the kdelibs ebuild doing in there?
Comment 9 Carsten Lohrke (RETIRED) gentoo-dev 2007-06-28 14:40:34 UTC
Jakub: kdelibs provides the library, when built with USE=-avahi
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 14:44:03 UTC
(In reply to comment #9)
> Jakub: kdelibs provides the library, when built with USE=-avahi

So why are you deleting the library when it breaks other stuff? See all the duplicate bugs, they are all about missing this lib.
Comment 11 Carsten Lohrke (RETIRED) gentoo-dev 2007-06-28 14:49:52 UTC
Jakub: Please stop spamming this bug. The ebuild is correct.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 14:51:32 UTC
(In reply to comment #11)
> Jakub: Please stop spamming this bug. The ebuild is correct.

Thanks for detailed explanation - the ebuild is correct because it deletes libs other stuff needs link to. Are you joking?


Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-06-28 16:31:17 UTC
(In reply to comment #12)
> the ebuild is correct because it deletes libs other stuff needs link to.

But kde-misc/kdnssd-avahi-0.1.2 installs:
/usr/lib/libkdnssd.la
/usr/lib/libkdnssd.so
/usr/lib/libkdnssd.so.1
/usr/lib/libkdnssd.so.1.0.0
Comment 14 Markus Rothe (RETIRED) gentoo-dev 2007-06-28 17:36:44 UTC
the solution would be to merge kdnssd-avahi into kdelibs?

carlo: and if not could you please explain, why the ebuild is correct? Something is broken somewhere...
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 18:08:02 UTC
(In reply to comment #13)
> But kde-misc/kdnssd-avahi-0.1.2 installs:
> /usr/lib/libkdnssd.la
> /usr/lib/libkdnssd.so
> /usr/lib/libkdnssd.so.1
> /usr/lib/libkdnssd.so.1.0.0

Then kde-misc/kdnssd-avahi should delete the stuff installed by kdelibs, or it shouldn't be a separate ebuild when it doesn't make any sense.
Comment 16 Carsten Lohrke (RETIRED) gentoo-dev 2007-06-28 18:17:59 UTC
(In reply to comment #14)
> the solution would be to merge kdnssd-avahi into kdelibs?

Well, didn't thought about merge the packages. Good idea as a workaround.

 
> carlo: and if not could you please explain, why the ebuild is correct?
> Something is broken somewhere...

In the first place wrt Jakubs pointless nagging, but in the end this bug is about one of the many shortcommings of current Portage's dependency resolver.
Comment 17 Zac Medico gentoo-dev 2007-06-29 01:55:04 UTC
(In reply to comment #7)
> Not possible, since kdnssd-avahi depends on kdelibs and Portage builds runtime
> dependencies before (and even if after, we'd run into the same problem as with
> PDEPEND. That said, fixing this (installing RDPENDs "directly" afterwards
> (speak: caring for the correct order the packages are built), we wouldn't need
> PDEPEND at all).

It seems like you should move it to RDEPEND.  The resolver tries to install RDEPEND first, but in the case of circular RDEPEND, RDEPEND will be installed immediately after.  PDEPEND has no hard order requirement, see bug #172511.
Comment 18 Zac Medico gentoo-dev 2007-06-29 05:19:14 UTC
Everything needed to solve this bug is already fixed in portage-2.1.2.x.

*** This bug has been marked as a duplicate of bug 147766 ***
Comment 19 Wulf Krueger (RETIRED) gentoo-dev 2007-06-29 05:58:24 UTC
Bug 147766 can probably *resolve* this one but this one's neither its dupe, IMHO, nor is this fixed yet, so I'm re-opening.

Thanks, Zac, for your help!
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-06-29 07:47:19 UTC
(In reply to comment #17)
> It seems like you should move it to RDEPEND.  The resolver tries to install
> RDEPEND first, but in the case of circular RDEPEND, RDEPEND will be installed
> immediately after. 

Well, then the fix doesn't work, see Bug 179736 (both DEPEND and RDEPEND produce unsolvable circular dependency). I'm afraid this is not a solution.

Comment 21 Zac Medico gentoo-dev 2007-06-29 11:21:18 UTC
Circular RDEPEND works fine, but if a DEPEND is mixed in then it will cause a circular dependency panic as shown in bug 179736.  I'll see about making a patch for that.
Comment 22 Zac Medico gentoo-dev 2007-06-29 12:15:41 UTC
After thinking about this a little more, it seems like it would be paradoxical to try and allow a relationship like that in bug 179736.  Consider the state after kdelibs is installed.  At this point, kdelibs can not necessarily be relied upon as a build time dependency since it has an unsatisfied runtime dependency.  While it may work for some dependency relationships, it's not guaranteed to work for all of them.

On possible alternative solution to this to create a virtual/avahi and have packages that need the library depend on that.  Unfortunately, USE deps aren't implemented yet, so the only way to enforce the state of the avahi flag on kdelibs is the built_with_use() function from eutils.  I suppose that function could run inside the pkg_setup() function of virtual/avahi.
Comment 23 Zac Medico gentoo-dev 2007-07-01 05:37:46 UTC
(In reply to comment #7)
> Not possible, since kdnssd-avahi depends on kdelibs and Portage builds runtime
> dependencies before (and even if after, we'd run into the same problem as with
> PDEPEND. That said, fixing this (installing RDPENDs "directly" afterwards
> (speak: caring for the correct order the packages are built), we wouldn't need
> PDEPEND at all).

As I explained in comment #22, there are issues with circular relationships that are DEPEND in one direction and RDEPEND in the other (like bug 179736).  Another alternative solution, besides the virtual/avahi idea, would be to make PDEPEND behave more like RDEPEND.  If a PDEPEND is installed "directly" afterwards whenever possible, then it will make the current relationship between kdelibs and kdnssd-avahi behave as intended.  This kind of change in the PDEPEND behavior might be a nice way to add more flexibility in the way that dependencies may be specified (and easier that creating a virtual/avahi).
Comment 24 Zac Medico gentoo-dev 2007-07-01 07:57:30 UTC
Created attachment 123512 [details, diff]
try to merge PDEPEND as soon as possible so that it behaves more like RDEPEND

This patch isn't completely optimal but it should do what's intended most of the time.
Comment 25 Zac Medico gentoo-dev 2007-07-08 21:38:08 UTC
This has been released in 2.1.3_rc7.
Comment 26 Carsten Lohrke (RETIRED) gentoo-dev 2007-07-27 13:35:17 UTC
Any chance to have a 2.1.2.10 with this fix? When we stabilise KDE everyone with USE=avahi will hit this...
Comment 27 Zac Medico gentoo-dev 2007-07-27 18:20:07 UTC
I wasn't planning to do another 2.1.2.x release.  2.1.3 is pretty stable so I'll see about making that into a final release (can have it in the tree today or tomorrow).
Comment 28 Marcus D. Hanwell (RETIRED) gentoo-dev 2007-07-29 09:39:48 UTC
We were hoping to have KDE stable this weekend but it looks like this PDEPEND issue is a blocker due to the avahi stuff as far as I can see. What kind of time line are we looking at to get a stable portage with this fix in?
Comment 29 Zac Medico gentoo-dev 2007-07-29 10:43:10 UTC
I think I can get it done tomorrow.