1 |
On Monday 23 October 2006 16:26, Brian wrote: |
2 |
> I've been improving portholes dependency display, adding more info to |
3 |
> it. I've run into a minor snag when virtuals are concerned. There also |
4 |
> seems to be 2 sources of virtuals. Both are not identical to each |
5 |
> other: |
6 |
> |
7 |
> /usr/portage/virtual -- which seem to be packages. |
8 |
|
9 |
They are just regular packages. |
10 |
|
11 |
> virtuals = portage.db[portage.root]["virtuals"] from |
12 |
> gentoolkit.__init__.py |
13 |
|
14 |
I'm not sure exactly what this returns, but it's probably equivalent to |
15 |
portage.settings.virtuals. |
16 |
|
17 |
> I've found virtuals in the tree that are not in portages virtuals and |
18 |
> vice-versa. |
19 |
> Is there an order to their use by portage? |
20 |
|
21 |
atom = "virtual/portage" |
22 |
non_virtual_atom = portage.dep_virtual([atom], portage.settings)[0] |
23 |
|
24 |
if atom == non_virtual_atom: |
25 |
print atom,"is a 'new style' virtual (aka regular package)" |
26 |
else: |
27 |
print atom,"is an 'old style' virtual that resolves to', |
28 |
print non_virtual_atom |
29 |
|
30 |
> Can the ones in the tree be |
31 |
> treated as a category/package for listings, etc.. The ones in the tree |
32 |
> do seem to be returned by: |
33 |
> |
34 |
> portage.db['/']['porttree'].getallnodes()[:] # copy |
35 |
> |
36 |
> The main reason I am looking at this is for indicating the dependency |
37 |
> installed/needed for the virtual. If an installed one is found I use |
38 |
> it's package name. If not where should I get it? From the virtuals in |
39 |
> portage or the tree? both? - then which order? |
40 |
|
41 |
The ones in the tree are just regular packages - but may also exist in the |
42 |
PROVIDE attribute of associated ebuilds. As for ordering, packages with |
43 |
PROVIDE override identically named packages in the tree. If you use something |
44 |
similar to the above, it should all be taken care of though. |
45 |
|
46 |
-- |
47 |
Jason Stubbs |
48 |
-- |
49 |
gentoo-portage-dev@g.o mailing list |