Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] DepSet
Date: Sun, 13 Nov 2005 04:52:26
Message-Id: 20051113045204.GA7320@nightcrawler
In Reply to: [gentoo-portage-dev] DepSet by Alec Warner
1 On Fri, Nov 11, 2005 at 11:47:17PM -0500, Alec Warner wrote:
2 > There is a problem with DepSet in 3.0, it doesn't parse dependencies
3 > properly in the case of dev-php/php-4.4.0-r1.
4 >
5 > This is using pkg.get.data("RDEPEND", "")
6 pkg.data["RDEPEND"] I assume (no get method).
7
8 > Package deps:
9 > berkdb? ( =sys-libs/db-1* || ( >=sys-libs/db-4.0.14-r2
10 > >=sys-libs/db-3.2.9-r9 ) )
11
12 <leave only what's relevant please, scanning for berkdb is easy, but
13 people are lazy>
14
15 > Notice the correct || ( bla foo ) dependency with berkdb?
16 >
17 > Now I switch to pkg.rdepends():
18 > Package rdeps:
19 > berkdb? ( =sys-libs/db-1* ( >=sys-libs/db-4.0.14-r2 ||
20 > >=sys-libs/db-3.2.9-r9 ) )
21
22 > Notice now that the berkdb? depend is ( bla || foo ) which is now
23 > invalid, causing StateGraph to go bonkers.
24 *cough* StateGraph losing it's marbles isn't due to this.
25
26 >>> d=DepSet("|| ( a b c )")
27 >>> print str(d) # yes that's redundant, making it clear __str__ is involved
28 ( a || b || c )
29
30 An OrRestriction is an ordered list of restrictions, short circuit or
31 searching for a True... in python the equivalent code would be
32
33 >>> if a or b or c:
34
35 the || placement is just a difference in how __str__ outputs... it's
36 not a bug, it's a difference in how it's presented for str output.
37 Internally, DepSet parses it correctly.
38
39 ~harring

Replies

Subject Author
Re: [gentoo-portage-dev] DepSet Zac Medico <zmedico@×××××.com>