Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Re: Re: Patch problem
Date: Tue, 08 Mar 2011 14:58:26
Message-Id: 1299596261.24424.84.camel@big_daddy.dol-sen.ca
In Reply to: [gentoo-portage-dev] Re: Re: Patch problem by Michael
1 On Wed, 2011-03-09 at 00:41 +1100, Michael wrote:
2 > Zac Medico wrote:
3 > > Inside depgraph._resolve(), it returns False if
4 > > self._dynamic_config._needed_use_config_changes is non-empty. You want
5 > > to add an option that causes it to return True instead. Also, you'll
6 > > need to propagate these changes to the config.setcpv() method somehow,
7 > > so that the changes will be applied by the Scheduler at build time.
8 > > Normally, the config.setcpv() method calculates USE based on config
9 > > files, but you want it override the config files with whatever values
10 > > the depgraph's _needed_use_config_changes contains.
11 >
12 > I've been able to collect the list of flags required to satisfy the
13 > dependency and apply them, but I'm having difficulty with ensuring that they
14 > do not override the user's settings.
15 >
16 > eg. need +foo to satisfy the dependency, but do not do it it USE="-foo".
17 >
18 > As suggested by yourself, portage.settings.configdict["conf"]["USE"] indeed
19 > does contain explicit enable/disable information from make.conf, however the
20 > other keys, such as those representing the env or package.use do not.
21 >
22 > How can I get this information?
23 >
24 >
25 > Thanks,
26 > Michael
27 >
28 >
29
30 I suppose you could get the final environment before you modify the USE
31 then compare with the portage.settings.configdict["conf"]["USE"] you
32 already got.
33
34 have a look in the public_api branch. there are several functions there
35 that do that.
36
37 http://ln-s.net/8a4K or
38 http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=blob;f=pym/portage/api/flag.py;h=52ea9be0128074dd3a544ea480796f17591232c2;hb=refs/heads/public_api
39 --
40 Brian Dolbec <brian.dolbec@×××××.com>

Attachments

File name MIME type
signature.asc application/pgp-signature