Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/
Date: Sat, 02 Mar 2013 00:58:15
Message-Id: 1362185876.dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf.zmedico@gentoo
1 commit: dd75365b27460fc5ceea697bfbb7cb2c2ddcc1cf
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 2 00:57:56 2013 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 2 00:57:56 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dd75365b
7
8 Fix autounmask/sub-slot interference, bug #459832
9
10 ---
11 pym/_emerge/depgraph.py | 34 +++++++++++++++++++++++-----------
12 1 files changed, 23 insertions(+), 11 deletions(-)
13
14 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
15 index 6f7b673..7e51d03 100644
16 --- a/pym/_emerge/depgraph.py
17 +++ b/pym/_emerge/depgraph.py
18 @@ -3058,6 +3058,10 @@ class depgraph(object):
19 self._dynamic_config._need_restart = True
20 return False, myfavorites
21
22 + if self.need_restart():
23 + # want_restart_for_use_change triggers this
24 + return False, myfavorites
25 +
26 # Any failures except those due to autounmask *alone* should return
27 # before this point, since the success_without_autounmask flag that's
28 # set below is reserved for cases where there are *zero* other
29 @@ -4274,19 +4278,27 @@ class depgraph(object):
30 if self._dynamic_config._autounmask is True:
31 reset_pkg(pkg)
32
33 - for autounmask_level in self._autounmask_levels():
34 - if pkg is not None:
35 - break
36 + # Temporarily reset _need_restart state, in order to
37 + # avoid interference as reported in bug #459832.
38 + earlier_need_restart = self._dynamic_config._need_restart
39 + self._dynamic_config._need_restart = False
40 + try:
41 + for autounmask_level in self._autounmask_levels():
42 + if pkg is not None:
43 + break
44
45 - pkg, existing = \
46 - self._wrapped_select_pkg_highest_available_imp(
47 - root, atom, onlydeps=onlydeps,
48 - autounmask_level=autounmask_level)
49 + pkg, existing = \
50 + self._wrapped_select_pkg_highest_available_imp(
51 + root, atom, onlydeps=onlydeps,
52 + autounmask_level=autounmask_level)
53
54 - reset_pkg(pkg)
55 -
56 - if self._dynamic_config._need_restart:
57 - return None, None
58 + reset_pkg(pkg)
59 +
60 + if self._dynamic_config._need_restart:
61 + return None, None
62 + finally:
63 + if earlier_need_restart:
64 + self._dynamic_config._need_restart = True
65
66 if pkg is None:
67 # This ensures that we can fall back to an installed package