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/portage/tests/resolver/, pym/_emerge/
Date: Fri, 04 May 2018 17:12:12
Message-Id: 1525453867.ce150da22e351a7ba52a6390b9cb7aa076c0c8ce.zmedico@gentoo
1 commit: ce150da22e351a7ba52a6390b9cb7aa076c0c8ce
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 4 03:21:40 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri May 4 17:11:07 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ce150da2
7
8 depgraph.autounmask_breakage_detected: ignore REQUIRED_USE violations (bug 654782)
9
10 When autounmask USE changes violate REQUIRED_USE, rather than
11 recalculate with autounmask disabled, display the autounmask USE
12 changes along with the REQUIRED_USE violation. Adjust unit tests
13 to allow for the autounmask USE changes that were previously
14 discarded. For the case reported in bug 654782, the output will
15 appear as follows:
16
17 The following keyword changes are necessary to proceed:
18 (see "package.accept_keywords" in the portage(5) man page for more details)
19 # required by =retext-7.0.1-r1 (argument)
20 =app-editors/retext-7.0.1-r1 ~amd64
21
22 The following USE changes are necessary to proceed:
23 (see "package.use" in the portage(5) man page for more details)
24 # required by app-editors/retext-7.0.1-r1::gentoo
25 # required by =retext-7.0.1-r1 (argument)
26 >=dev-python/PyQt5-5.9.2 printsupport webengine network gui widgets
27
28 !!! The ebuild selected to satisfy "dev-python/PyQt5[gui,network,printsupport,webengine,widgets,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]" has unmet requirements.
29 - dev-python/PyQt5-5.9.2::gentoo USE="-bluetooth -dbus -debug -declarative -designer -examples -gles2 -gui -help -location -multimedia -network -opengl -positioning -printsupport -sensors -serialport -sql -svg -testlib -webchannel -webengine -webkit -websockets -widgets -x11extras -xmlpatterns" PYTHON_TARGETS="python2_7 python3_4 python3_6 -python3_5"
30
31 The following REQUIRED_USE flag constraints are unsatisfied:
32 webengine? ( widgets? ( webchannel ) )
33
34 The above constraints are a subset of the following complete expression:
35 any-of ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 ) bluetooth? ( gui ) declarative? ( gui network ) designer? ( widgets ) help? ( gui widgets ) location? ( positioning ) multimedia? ( gui network ) opengl? ( gui widgets ) positioning? ( gui ) printsupport? ( gui widgets ) sensors? ( gui ) serialport? ( gui ) sql? ( widgets ) svg? ( gui widgets ) testlib? ( widgets ) webchannel? ( network ) webengine? ( network widgets? ( printsupport webchannel ) ) webkit? ( gui network printsupport widgets ) websockets? ( network ) widgets? ( gui ) xmlpatterns? ( network )
36
37 (dependency required by "app-editors/retext-7.0.1-r1::gentoo" [ebuild])
38 (dependency required by "=retext-7.0.1-r1" [argument])
39
40 Bug: https://bugs.gentoo.org/654782
41 Reviewed-by: M. J. Everitt <m.j.everitt <AT> iee.org>
42
43 pym/_emerge/depgraph.py | 8 ++--
44 pym/portage/tests/resolver/test_autounmask.py | 48 ++++++++++++++++++++--
45 pym/portage/tests/resolver/test_slot_collisions.py | 20 +++++----
46 3 files changed, 61 insertions(+), 15 deletions(-)
47
48 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
49 index fbd16ad98..429d8871c 100644
50 --- a/pym/_emerge/depgraph.py
51 +++ b/pym/_emerge/depgraph.py
52 @@ -3009,6 +3009,10 @@ class depgraph(object):
53 {"myparent" : dep.parent, "show_req_use" : pkg}))
54 self._dynamic_config._required_use_unsatisfied = True
55 self._dynamic_config._skip_restart = True
56 + # Add pkg to digraph in order to enable autounmask messages
57 + # for this package, which is useful when autounmask USE
58 + # changes have violated REQUIRED_USE.
59 + self._dynamic_config.digraph.add(pkg, dep.parent, priority=priority)
60 return 0
61
62 if not pkg.onlydeps:
63 @@ -9428,10 +9432,6 @@ class depgraph(object):
64 return self._dynamic_config._need_config_reload
65
66 def autounmask_breakage_detected(self):
67 - # Check for REQUIRED_USE violations.
68 - for changes in self._dynamic_config._needed_use_config_changes.values():
69 - if getattr(changes, 'required_use_satisfied', None) is False:
70 - return True
71 try:
72 for pargs, kwargs in self._dynamic_config._unsatisfied_deps_for_display:
73 self._show_unsatisfied_dep(
74
75 diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
76 index 9042349ea..809d42104 100644
77 --- a/pym/portage/tests/resolver/test_autounmask.py
78 +++ b/pym/portage/tests/resolver/test_autounmask.py
79 @@ -251,15 +251,42 @@ class AutounmaskTestCase(TestCase):
80 use_changes={ "dev-util/R-1": { "bar": True } }),
81
82 #Test interaction with REQUIRED_USE.
83 + # Some of these cases trigger USE change(s) that violate
84 + # REQUIRED_USE, so the USE changes are shown along with
85 + # the REQUIRED_USE violation that they would trigger.
86 +
87 + # The following USE changes are necessary to proceed:
88 + # (see "package.use" in the portage(5) man page for more details)
89 + # # required by app-portage/A-1::test_repo
90 + # # required by =app-portage/A-1 (argument)
91 + # >=app-portage/B-1 foo
92 + #
93 + # !!! The ebuild selected to satisfy "app-portage/B[foo]" has unmet requirements.
94 + # - app-portage/B-1::test_repo USE="bar (forced-flag) -foo"
95 + #
96 + # The following REQUIRED_USE flag constraints are unsatisfied:
97 + # exactly-one-of ( foo bar )
98 ResolverPlaygroundTestCase(
99 ["=app-portage/A-1"],
100 options={ "--autounmask": True },
101 - use_changes=None,
102 + use_changes={"app-portage/B-1": {"foo": True}},
103 success=False),
104 +
105 + # The following USE changes are necessary to proceed:
106 + # (see "package.use" in the portage(5) man page for more details)
107 + # # required by app-portage/A-2::test_repo
108 + # # required by =app-portage/A-2 (argument)
109 + # >=app-portage/B-1 foo
110 + #
111 + # !!! The ebuild selected to satisfy "app-portage/B[foo=]" has unmet requirements.
112 + # - app-portage/B-1::test_repo USE="bar (forced-flag) -foo"
113 + #
114 + # The following REQUIRED_USE flag constraints are unsatisfied:
115 + # exactly-one-of ( foo bar )
116 ResolverPlaygroundTestCase(
117 ["=app-portage/A-2"],
118 options={ "--autounmask": True },
119 - use_changes=None,
120 + use_changes={"app-portage/B-1": {"foo": True}},
121 success=False),
122 ResolverPlaygroundTestCase(
123 ["=app-portage/C-1"],
124 @@ -269,10 +296,25 @@ class AutounmaskTestCase(TestCase):
125
126 # Test bug 622462, where it inappropriately unmasked a newer
127 # version rather than report unsatisfied REQUIRED_USE.
128 + #
129 + # The following USE changes are necessary to proceed:
130 + # (see "package.use" in the portage(5) man page for more details)
131 + # # required by sci-mathematics/octave-4.2.2::test_repo
132 + # # required by sci-mathematics/octave (argument)
133 + # >=x11-libs/qscintilla-2.9.4 qt5
134 + #
135 + # !!! The ebuild selected to satisfy ">=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)]" has unmet requirements.
136 + # - x11-libs/qscintilla-2.9.4::test_repo USE="qt4 -qt5"
137 + #
138 + # The following REQUIRED_USE flag constraints are unsatisfied:
139 + # exactly-one-of ( qt4 qt5 )
140 + #
141 + # (dependency required by "sci-mathematics/octave-4.2.2::test_repo" [ebuild])
142 + # (dependency required by "sci-mathematics/octave" [argument])
143 ResolverPlaygroundTestCase(
144 ["sci-mathematics/octave"],
145 options={"--autounmask": True},
146 - use_changes=None,
147 + use_changes={"x11-libs/qscintilla-2.9.4": {"qt5": True}},
148 success=False),
149
150 #Make sure we don't change masked/forced flags.
151
152 diff --git a/pym/portage/tests/resolver/test_slot_collisions.py b/pym/portage/tests/resolver/test_slot_collisions.py
153 index 9fcd5294a..430ccaad6 100644
154 --- a/pym/portage/tests/resolver/test_slot_collisions.py
155 +++ b/pym/portage/tests/resolver/test_slot_collisions.py
156 @@ -136,15 +136,19 @@ class SlotCollisionTestCase(TestCase):
157 slot_collision_solutions = [{"sci-libs/Q-1": {"foo": True}, "sci-libs/P-1": {"foo": True}}]
158 ),
159
160 - #Conflict with REQUIRED_USE
161 - ResolverPlaygroundTestCase(
162 - ["=app-misc/C-1", "=app-misc/B-1"],
163 - all_permutations = True,
164 - slot_collision_solutions = [],
165 - mergelist = ["app-misc/A-1", "app-misc/C-1", "app-misc/B-1"],
166 - ignore_mergelist_order = True,
167 - success = False),
168 )
169 + # NOTE: For this test case, ResolverPlaygroundTestCase attributes
170 + # vary randomly between runs, so it's expected to fail randomly.
171 + #Conflict with REQUIRED_USE
172 + #ResolverPlaygroundTestCase(
173 + # ["=app-misc/C-1", "=app-misc/B-1"],
174 + # all_permutations = True,
175 + # slot_collision_solutions = None,
176 + # use_changes={"app-misc/A-1": {"foo": True}},
177 + # mergelist = ["app-misc/A-1", "app-misc/C-1", "app-misc/B-1"],
178 + # ignore_mergelist_order = True,
179 + # success = False),
180 + #)
181
182 playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
183 try: