[gentoo-portage-dev] Re: Re: Patch problem

2011-03-08 Thread Michael
Zac Medico wrote:
 Inside depgraph._resolve(), it returns False if
 self._dynamic_config._needed_use_config_changes is non-empty. You want
 to add an option that causes it to return True instead. Also, you'll
 need to propagate these changes to the config.setcpv() method somehow,
 so that the changes will be applied by the Scheduler at build time.
 Normally, the config.setcpv() method calculates USE based on config
 files, but you want it override the config files with whatever values
 the depgraph's _needed_use_config_changes contains.

I've been able to collect the list of flags required to satisfy the 
dependency and apply them, but I'm having difficulty with ensuring that they 
do not override the user's settings.

eg. need +foo to satisfy the dependency, but do not do it it USE=-foo.

As suggested by yourself, portage.settings.configdict[conf][USE] indeed 
does contain explicit enable/disable information from make.conf, however the 
other keys, such as those representing the env or package.use do not.

How can I get this information?


Thanks,
Michael




Re: [gentoo-portage-dev] Re: Re: Patch problem

2011-03-08 Thread Zac Medico
On 03/08/2011 05:41 AM, Michael wrote:
 I've been able to collect the list of flags required to satisfy the 
 dependency and apply them, but I'm having difficulty with ensuring that they 
 do not override the user's settings.
 
 eg. need +foo to satisfy the dependency, but do not do it it USE=-foo.
 
 As suggested by yourself, portage.settings.configdict[conf][USE] indeed 
 does contain explicit enable/disable information from make.conf, however the 
 other keys, such as those representing the env or package.use do not.
 
 How can I get this information?

In pym/portage/package/ebuild/_config/UseManager.py there's a getPUSE
method that should give you the negative package.use settings. That's
what setcpv calls to the package.use settings before it applies the
incremental stacking that eliminates the negative values.
-- 
Thanks,
Zac