public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] Fix random SonameOrChoicesTestCase failure
@ 2015-02-14 19:11 Zac Medico
  2015-02-14 19:39 ` Brian Dolbec
  0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-02-14 19:11 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

In commit 11467fc640995e3dc8897c82bbc7130d5bf27d05, the
atom_not_selected variable was initialized outside of a loop, when it
should have been re-initialized for each iteration of the loop. This
caused atom_not_selected to have an incorrect value in some cases,
triggering random failures of SonameOrChoicesTestCase, as observed here:

	https://travis-ci.org/gentoo/portage/jobs/50673911#L1114

Fixes: 11467fc64099 ("depgraph: soname dependency resolution (bug 282639)")
---
 pym/_emerge/depgraph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 63c89a4..e8a3110 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1860,9 +1860,9 @@ class depgraph(object):
 			replacement_candidates = []
 			# Set of all packages all atoms can agree on.
 			all_candidate_pkgs = None
-			atom_not_selected = False
 
 			for atom in atoms:
+				atom_not_selected = False
 
 				if not atom.package:
 					unevaluated_atom = None
-- 
2.0.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-portage-dev] [PATCH] Fix random SonameOrChoicesTestCase failure
  2015-02-14 19:11 [gentoo-portage-dev] [PATCH] Fix random SonameOrChoicesTestCase failure Zac Medico
@ 2015-02-14 19:39 ` Brian Dolbec
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-02-14 19:39 UTC (permalink / raw
  To: gentoo-portage-dev

On Sat, 14 Feb 2015 11:11:56 -0800
Zac Medico <zmedico@gentoo.org> wrote:

> In commit 11467fc640995e3dc8897c82bbc7130d5bf27d05, the
> atom_not_selected variable was initialized outside of a loop, when it
> should have been re-initialized for each iteration of the loop. This
> caused atom_not_selected to have an incorrect value in some cases,
> triggering random failures of SonameOrChoicesTestCase, as observed
> here:
> 
> 	https://travis-ci.org/gentoo/portage/jobs/50673911#L1114
> 
> Fixes: 11467fc64099 ("depgraph: soname dependency resolution (bug
> 282639)") ---
>  pym/_emerge/depgraph.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
> index 63c89a4..e8a3110 100644
> --- a/pym/_emerge/depgraph.py
> +++ b/pym/_emerge/depgraph.py
> @@ -1860,9 +1860,9 @@ class depgraph(object):
>  			replacement_candidates = []
>  			# Set of all packages all atoms can agree on.
>  			all_candidate_pkgs = None
> -			atom_not_selected = False
>  
>  			for atom in atoms:
> +				atom_not_selected = False
>  
>  				if not atom.package:
>  					unevaluated_atom = None

LGTM

-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-14 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-14 19:11 [gentoo-portage-dev] [PATCH] Fix random SonameOrChoicesTestCase failure Zac Medico
2015-02-14 19:39 ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox