On Thu, Mar 16, 2017 at 3:33 PM, Brian Dolbec <dol...@gentoo.org> wrote:
> On Thu, 16 Mar 2017 14:19:07 -0700
> Zac Medico <zmed...@gentoo.org> wrote:
>
>> Fix the _slot_operator_update_probe method to ensure that the
>> atom_not_selected variable is always properly initialized. This
>> problem prevented the method from identifying slot operator rebuild
>> candidates, leading to dependency conflicts and/or missed updates.
>> For example, this may have triggered the missed llvm update reported
>> in bug 611742, since these dependencies from the mesa-17.0.1 ebuild
>> are capable of triggering the problem, when atom_not_selected is not
>> properly set to True for the second atom:
>>
>>       || (
>>               sys-devel/llvm:4[${MULTILIB_USEDEP}]
>>               >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}]
>>       )
>>
>> X-Gentoo-bug: 612846
>> X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=612846
>> ---
>> [PATCH v2] fixes it to handle soname atoms correctly
>>
>>  pym/_emerge/depgraph.py | 17 ++++++++++++++---
>>  1 file changed, 14 insertions(+), 3 deletions(-)
>>
>> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
>> index ad94fb7..511944c 100644
>> --- a/pym/_emerge/depgraph.py
>> +++ b/pym/_emerge/depgraph.py
>> @@ -1895,7 +1895,9 @@ class depgraph(object):
>>                       all_candidate_pkgs = None
>>
>>                       for atom in atoms:
>> -                             atom_not_selected = False
>> +                             # The _select_atoms_probe method is
>> expensive, so initialization
>> +                             # of this variable is only
>> permformed on demand.
>> +                             atom_not_selected = None
>>
>>                               if not atom.package:
>>                                       unevaluated_atom = None
>> @@ -1977,8 +1979,8 @@ class depgraph(object):
>>                                               if selected_atoms is
>> None: selected_atoms = self._select_atoms_probe(
>>                                                               dep.child.root,
>> replacement_parent)
>> -                                             if unevaluated_atom
>> not in selected_atoms:
>> -
>> atom_not_selected = True
>> +                                             atom_not_selected =
>> unevaluated_atom not in selected_atoms
>> +                                             if atom_not_selected:
>>                                                       break
>>
>>                                       if not insignificant and \
>> @@ -1989,6 +1991,15 @@ class depgraph(object):
>>                                                       (pkg,
>> unevaluated_atom or atom)) candidate_pkgs.append(pkg)
>>
>> +                             # When unevaluated_atom is None, it
>> means that atom is
>> +                             # an soname atom which is
>> unconditionally selected, and
>> +                             # _select_atoms_probe is not
>> applicable.
>> +                             if atom_not_selected is None and
>> unevaluated_atom is not None:
>> +                                     if selected_atoms is None:
>> +                                             selected_atoms =
>> self._select_atoms_probe(
>> +
>> dep.child.root, replacement_parent)
>> +                                     atom_not_selected =
>> unevaluated_atom not in selected_atoms +
>>                               if atom_not_selected:
>>                                       continue
>>                               
>> replacement_candidates.append(candidate_pkg_atoms)
>
> Looks good other than 2 typos permfomed and "# an soname"  -n

Thanks, merged:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5d638cf855656afab141da8d7b4d7f66cad3450
-- 
Thanks,
Zac

Reply via email to