Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Debug-Client/files/, dev-perl/Debug-Client/
Date: Sat, 01 Jul 2017 00:59:48
Message-Id: 1498870772.120dd1264fc3463f6ce7ee647448dbd7276e14eb.kentnl@gentoo
1 commit: 120dd1264fc3463f6ce7ee647448dbd7276e14eb
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 1 00:59:07 2017 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 1 00:59:32 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=120dd126
7
8 dev-perl/Debug-Client: Fix test failures due to '.' in @INC ( bug #615722 )
9
10 - Communicates src_prepare hack to patch
11 - Fixes test logic with patch to not fail as well ( submitted upstream )
12
13 Bug: https://bugs.gentoo.org/615722
14 Package-Manager: Portage-2.3.6, Repoman-2.3.2
15
16 dev-perl/Debug-Client/Debug-Client-0.300.0.ebuild | 7 +-
17 .../files/Debug-Client-0.30-no-dot-inc.patch | 534 +++++++++++++++++++++
18 2 files changed, 535 insertions(+), 6 deletions(-)
19
20 diff --git a/dev-perl/Debug-Client/Debug-Client-0.300.0.ebuild b/dev-perl/Debug-Client/Debug-Client-0.300.0.ebuild
21 index 27b9217908b..4aa9d2aeffe 100644
22 --- a/dev-perl/Debug-Client/Debug-Client-0.300.0.ebuild
23 +++ b/dev-perl/Debug-Client/Debug-Client-0.300.0.ebuild
24 @@ -38,9 +38,4 @@ DEPEND="${RDEPEND}
25 >=dev-perl/Term-ReadLine-Perl-1.30.300
26 )
27 "
28 -
29 -src_prepare() {
30 - sed -i -e 's/use inc::Module::Install/use lib q[.]; use inc::Module::Install/' Makefile.PL ||
31 - die "Can't patch Makefile.PL for 5.26 dot-in-inc"
32 - perl-module_src_prepare
33 -}
34 +PATCHES=( "${FILESDIR}/${PN}-0.30-no-dot-inc.patch" )
35
36 diff --git a/dev-perl/Debug-Client/files/Debug-Client-0.30-no-dot-inc.patch b/dev-perl/Debug-Client/files/Debug-Client-0.30-no-dot-inc.patch
37 new file mode 100644
38 index 00000000000..4727a9a7a40
39 --- /dev/null
40 +++ b/dev-perl/Debug-Client/files/Debug-Client-0.30-no-dot-inc.patch
41 @@ -0,0 +1,534 @@
42 +From b49aa99cbf608072dd6969bd859765dbf4be71f5 Mon Sep 17 00:00:00 2001
43 +From: Kent Fredric <kentfredric@×××××.com>
44 +Date: Sat, 1 Jul 2017 12:21:16 +1200
45 +Subject: [PATCH] Fix broken loading of local modules under Perl 5.26
46 +
47 +Perl 5.26 breaks the implication that:
48 +
49 + use inc::Module::Install;
50 + use t::lib::Debugger;
51 +
52 +Will load:
53 +
54 + ./inc/Module/Install.pm
55 + ./t/lib/Debugger.pm
56 +
57 +Respectively, due to '.' ceasing to be in @INC
58 +
59 +This fixes:
60 +- Makefile.PL by re-inserting the '.' ( which is the only
61 + thing that works, due to Module::Install shenanigans ).
62 +- Tests by replacing "use" statements with equivalent "require"
63 +statements.
64 +
65 +Some of the existing code ( eg: use_ok ) was already spurious and not
66 +very smart, because calling ->import while being outside of BEGIN { }
67 +has limited usefullness.
68 +
69 +But this was left with the semantically equivalent code that retains
70 +the loading of the relative path.
71 +
72 +There are strategies that would be "nicer" than what I've done,
73 +but they all wind up with you wanting to rename "Debugger.pm" to
74 +something else, because:
75 +
76 + use lib "t/lib";
77 + use Debugger;
78 +
79 +Is going to give people a much different impression from either
80 +
81 + use t::lib::Debugger
82 +
83 +Or
84 +
85 + BEGIN {
86 + require "./t/lib/Debugger.pm";
87 + t::lib::Debugger->import();
88 + }
89 +
90 +This closes https://github.com/PadreIDE/Debug-Client/issues/6
91 +PR: https://github.com/PadreIDE/Debug-Client/pull/7
92 +---
93 + Changes | 2 ++
94 + Makefile.PL | 1 +
95 + t/01-compile.t | 2 +-
96 + t/08-io.t | 5 ++++-
97 + t/10-top_tail.t | 5 ++++-
98 + t/10-top_tail_old.t | 6 +++++-
99 + t/11-add.t | 5 ++++-
100 + t/13-return.t | 5 ++++-
101 + t/14-run.t | 5 ++++-
102 + t/15-run_to_line.t | 5 ++++-
103 + t/16-run_to_sub.t | 5 ++++-
104 + t/17-stepin.t | 5 ++++-
105 + t/18-stepout.t | 5 ++++-
106 + t/19-stepover.t | 5 ++++-
107 + t/20-get_value.t | 5 ++++-
108 + t/21-toggle_trace.t | 5 ++++-
109 + t/22-subnames.t | 5 ++++-
110 + t/23-breakpoints.t | 5 ++++-
111 + t/24-y_zero.t | 5 ++++-
112 + t/25-get_v_vars.t | 5 ++++-
113 + t/26-get_x_vars.t | 5 ++++-
114 + t/27-get_p_exp.t | 5 ++++-
115 + t/28-get_h_var.t | 5 ++++-
116 + t/29-options.t | 5 ++++-
117 + t/40-test_1415-old.t | 5 ++++-
118 + t/40-test_1415.t | 5 ++++-
119 + t/99-perldb.t | 5 ++++-
120 + t/lib/Test_1415.pm | 5 ++++-
121 + t/lib/Top_Tail.pm | 3 ++-
122 + 29 files changed, 107 insertions(+), 27 deletions(-)
123 +
124 +diff --git a/Changes b/Changes
125 +index 104d73f..f9b1090 100644
126 +--- a/Changes
127 ++++ b/Changes
128 +@@ -1,5 +1,7 @@
129 + Changes for Debug::Client
130 +
131 ++ - Fix build and test failures under Perl 5.26 when '.' is not in @INC (KENTNL, PR #7)
132 ++
133 + 0.30 2017-06-19
134 + - Merged PR #5 (Fixed test failure due to perl regression fix in 5.21.3), thanks @TBSliver.
135 +
136 +diff --git a/Makefile.PL b/Makefile.PL
137 +index 8702771..74201e3 100644
138 +--- a/Makefile.PL
139 ++++ b/Makefile.PL
140 +@@ -1,3 +1,4 @@
141 ++use lib '.';
142 + use inc::Module::Install 1.08;
143 +
144 + name 'Debug-Client';
145 +diff --git a/t/01-compile.t b/t/01-compile.t
146 +index 73eb289..a6130a5 100644
147 +--- a/t/01-compile.t
148 ++++ b/t/01-compile.t
149 +@@ -8,7 +8,7 @@ use Test::More tests => 18;
150 +
151 + BEGIN {
152 + use_ok('Debug::Client');
153 +- use_ok('t::lib::Debugger');
154 ++ require_ok('./t/lib/Debugger.pm');
155 +
156 + use_ok( 'Carp', '1.20' );
157 + use_ok( 'IO::Socket::IP', '0.21' );
158 +diff --git a/t/08-io.t b/t/08-io.t
159 +index 41c6914..0f90433 100644
160 +--- a/t/08-io.t
161 ++++ b/t/08-io.t
162 +@@ -6,7 +6,10 @@ local $OUTPUT_AUTOFLUSH = 1;
163 +
164 + use Test::More tests => 12;
165 + use Test::Deep;
166 +-use t::lib::Debugger;
167 ++BEGIN {
168 ++ require "./t/lib/Debugger.pm";
169 ++ t::lib::Debugger->import;
170 ++}
171 +
172 + my ( $dir, $pid ) = start_script('t/eg/05-io.pl');
173 + my $path = $dir;
174 +diff --git a/t/10-top_tail.t b/t/10-top_tail.t
175 +index 577e7fc..0d11183 100644
176 +--- a/t/10-top_tail.t
177 ++++ b/t/10-top_tail.t
178 +@@ -7,7 +7,10 @@ local $OUTPUT_AUTOFLUSH = 1;
179 + use FindBin qw($Bin);
180 + use lib map "$Bin/$_", 'lib', '../lib';
181 +
182 +-use t::lib::Top_Tail;
183 ++BEGIN {
184 ++ require "./t/lib/Top_Tail.pm";
185 ++ t::lib::Top_Tail->import;
186 ++};
187 +
188 + # run all the test methods
189 + Test::Class->runtests;
190 +diff --git a/t/10-top_tail_old.t b/t/10-top_tail_old.t
191 +index 93802e3..02ab515 100644
192 +--- a/t/10-top_tail_old.t
193 ++++ b/t/10-top_tail_old.t
194 +@@ -10,7 +10,11 @@ local $| = 1;
195 + use Test::More tests => 5;
196 + use Test::Deep;
197 + use PadWalker;
198 +-use t::lib::Debugger;
199 ++
200 ++BEGIN {
201 ++ require "./t/lib/Debugger.pm";
202 ++ t::lib::Debugger->import;
203 ++}
204 +
205 + ok( start_script('t/eg/14-y_zero.pl'), 'start script' );
206 +
207 +diff --git a/t/11-add.t b/t/11-add.t
208 +index 6000234..86dc166 100644
209 +--- a/t/11-add.t
210 ++++ b/t/11-add.t
211 +@@ -9,7 +9,10 @@ local $| = 1;
212 +
213 + use Test::More tests => 10;
214 + use Test::Deep;
215 +-use t::lib::Debugger;
216 ++BEGIN {
217 ++ require "./t/lib/Debugger.pm";
218 ++ t::lib::Debugger->import;
219 ++}
220 +
221 + # Testing step_in (s) and show_line (.) on a simple script
222 +
223 +diff --git a/t/13-return.t b/t/13-return.t
224 +index a096b17..9e901b5 100644
225 +--- a/t/13-return.t
226 ++++ b/t/13-return.t
227 +@@ -7,7 +7,10 @@ use warnings FATAL => 'all';
228 + # Turn on $OUTPUT_AUTOFLUSH
229 + local $| = 1;
230 +
231 +-use t::lib::Debugger;
232 ++BEGIN {
233 ++ require "./t/lib/Debugger.pm";
234 ++ t::lib::Debugger->import;
235 ++}
236 +
237 + my ( $dir, $pid ) = start_script('t/eg/03-return.pl');
238 +
239 +diff --git a/t/14-run.t b/t/14-run.t
240 +index 3c7ed02..9bc9fc0 100644
241 +--- a/t/14-run.t
242 ++++ b/t/14-run.t
243 +@@ -7,7 +7,10 @@ use warnings FATAL => 'all';
244 + # Turn on $OUTPUT_AUTOFLUSH
245 + local $| = 1;
246 +
247 +-use t::lib::Debugger;
248 ++BEGIN {
249 ++ require "./t/lib/Debugger.pm";
250 ++ t::lib::Debugger->import;
251 ++}
252 +
253 + my ( $dir, $pid ) = start_script('t/eg/02-sub.pl');
254 +
255 +diff --git a/t/15-run_to_line.t b/t/15-run_to_line.t
256 +index 95c1f1c..6e38e62 100644
257 +--- a/t/15-run_to_line.t
258 ++++ b/t/15-run_to_line.t
259 +@@ -7,7 +7,10 @@ use warnings FATAL => 'all';
260 + # Turn on $OUTPUT_AUTOFLUSH
261 + local $| = 1;
262 +
263 +-use t::lib::Debugger;
264 ++BEGIN {
265 ++ require "./t/lib/Debugger.pm";
266 ++ t::lib::Debugger->import;
267 ++}
268 +
269 + my ( $dir, $pid ) = start_script('t/eg/02-sub.pl');
270 +
271 +diff --git a/t/16-run_to_sub.t b/t/16-run_to_sub.t
272 +index 0703c03..6629dc1 100644
273 +--- a/t/16-run_to_sub.t
274 ++++ b/t/16-run_to_sub.t
275 +@@ -7,7 +7,10 @@ use warnings FATAL => 'all';
276 + # Turn on $OUTPUT_AUTOFLUSH
277 + local $| = 1;
278 +
279 +-use t::lib::Debugger;
280 ++BEGIN {
281 ++ require "./t/lib/Debugger.pm";
282 ++ t::lib::Debugger->import;
283 ++}
284 +
285 + my $pid = start_script('t/eg/02-sub.pl');
286 +
287 +diff --git a/t/17-stepin.t b/t/17-stepin.t
288 +index 3df15cd..3c272d8 100644
289 +--- a/t/17-stepin.t
290 ++++ b/t/17-stepin.t
291 +@@ -13,7 +13,10 @@ plan( tests => 4 );
292 +
293 +
294 + #Top
295 +-use t::lib::Debugger;
296 ++BEGIN {
297 ++ require "./t/lib/Debugger.pm";
298 ++ t::lib::Debugger->import;
299 ++}
300 +
301 + start_script('t/eg/02-sub.pl');
302 + my $debugger;
303 +diff --git a/t/18-stepout.t b/t/18-stepout.t
304 +index 262d380..ff45ecc 100644
305 +--- a/t/18-stepout.t
306 ++++ b/t/18-stepout.t
307 +@@ -13,7 +13,10 @@ plan( tests => 4 );
308 +
309 +
310 + #Top
311 +-use t::lib::Debugger;
312 ++BEGIN {
313 ++ require "./t/lib/Debugger.pm";
314 ++ t::lib::Debugger->import;
315 ++}
316 +
317 + start_script('t/eg/02-sub.pl');
318 + my $debugger;
319 +diff --git a/t/19-stepover.t b/t/19-stepover.t
320 +index 244686d..bf1fcea 100644
321 +--- a/t/19-stepover.t
322 ++++ b/t/19-stepover.t
323 +@@ -13,7 +13,10 @@ plan( tests => 3 );
324 +
325 +
326 + #Top
327 +-use t::lib::Debugger;
328 ++BEGIN {
329 ++ require "./t/lib/Debugger.pm";
330 ++ t::lib::Debugger->import;
331 ++}
332 +
333 + start_script('t/eg/02-sub.pl');
334 + my $debugger;
335 +diff --git a/t/20-get_value.t b/t/20-get_value.t
336 +index ec6cc60..216de3b 100644
337 +--- a/t/20-get_value.t
338 ++++ b/t/20-get_value.t
339 +@@ -13,7 +13,10 @@ plan( tests => 6 );
340 +
341 +
342 + #Top
343 +-use t::lib::Debugger;
344 ++BEGIN {
345 ++ require "./t/lib/Debugger.pm";
346 ++ t::lib::Debugger->import;
347 ++}
348 +
349 + start_script('t/eg/02-sub.pl');
350 + my $debugger;
351 +diff --git a/t/21-toggle_trace.t b/t/21-toggle_trace.t
352 +index 2f37031..da154e6 100644
353 +--- a/t/21-toggle_trace.t
354 ++++ b/t/21-toggle_trace.t
355 +@@ -13,7 +13,10 @@ plan( tests => 2 );
356 +
357 +
358 + #Top
359 +-use t::lib::Debugger;
360 ++BEGIN {
361 ++ require "./t/lib/Debugger.pm";
362 ++ t::lib::Debugger->import;
363 ++}
364 +
365 + start_script('t/eg/14-y_zero.pl');
366 + my $debugger;
367 +diff --git a/t/22-subnames.t b/t/22-subnames.t
368 +index e77b5ac..89b5dac 100644
369 +--- a/t/22-subnames.t
370 ++++ b/t/22-subnames.t
371 +@@ -13,7 +13,10 @@ plan( tests => 2 );
372 +
373 +
374 + #Top
375 +-use t::lib::Debugger;
376 ++BEGIN {
377 ++ require "./t/lib/Debugger.pm";
378 ++ t::lib::Debugger->import;
379 ++}
380 +
381 + start_script('t/eg/14-y_zero.pl');
382 + my $debugger;
383 +diff --git a/t/23-breakpoints.t b/t/23-breakpoints.t
384 +index e63d5d8..611f92e 100644
385 +--- a/t/23-breakpoints.t
386 ++++ b/t/23-breakpoints.t
387 +@@ -13,7 +13,10 @@ plan( tests => 7 );
388 +
389 +
390 + #Top
391 +-use t::lib::Debugger;
392 ++BEGIN {
393 ++ require "./t/lib/Debugger.pm";
394 ++ t::lib::Debugger->import;
395 ++}
396 +
397 + start_script('t/eg/03-return.pl');
398 + my $debugger;
399 +diff --git a/t/24-y_zero.t b/t/24-y_zero.t
400 +index f561c3e..23b03c9 100644
401 +--- a/t/24-y_zero.t
402 ++++ b/t/24-y_zero.t
403 +@@ -13,7 +13,10 @@ plan( tests => 3 );
404 +
405 +
406 + #Top
407 +-use t::lib::Debugger;
408 ++BEGIN {
409 ++ require "./t/lib/Debugger.pm";
410 ++ t::lib::Debugger->import;
411 ++}
412 +
413 + start_script('t/eg/14-y_zero.pl');
414 + my $debugger;
415 +diff --git a/t/25-get_v_vars.t b/t/25-get_v_vars.t
416 +index 1b9338a..ce538af 100644
417 +--- a/t/25-get_v_vars.t
418 ++++ b/t/25-get_v_vars.t
419 +@@ -13,7 +13,10 @@ plan( tests => 2 );
420 +
421 +
422 + #Top
423 +-use t::lib::Debugger;
424 ++BEGIN {
425 ++ require "./t/lib/Debugger.pm";
426 ++ t::lib::Debugger->import;
427 ++}
428 +
429 + start_script('t/eg/14-y_zero.pl');
430 + my $debugger;
431 +diff --git a/t/26-get_x_vars.t b/t/26-get_x_vars.t
432 +index 5e66430..f478298 100644
433 +--- a/t/26-get_x_vars.t
434 ++++ b/t/26-get_x_vars.t
435 +@@ -13,7 +13,10 @@ plan( tests => 2 );
436 +
437 +
438 + #Top
439 +-use t::lib::Debugger;
440 ++BEGIN {
441 ++ require "./t/lib/Debugger.pm";
442 ++ t::lib::Debugger->import;
443 ++}
444 +
445 + start_script('t/eg/14-y_zero.pl');
446 + my $debugger;
447 +diff --git a/t/27-get_p_exp.t b/t/27-get_p_exp.t
448 +index 7b1649a..9432deb 100644
449 +--- a/t/27-get_p_exp.t
450 ++++ b/t/27-get_p_exp.t
451 +@@ -13,7 +13,10 @@ plan( tests => 7 );
452 +
453 +
454 + #Top
455 +-use t::lib::Debugger;
456 ++BEGIN {
457 ++ require "./t/lib/Debugger.pm";
458 ++ t::lib::Debugger->import;
459 ++}
460 +
461 + start_script('t/eg/14-y_zero.pl');
462 + my $debugger;
463 +diff --git a/t/28-get_h_var.t b/t/28-get_h_var.t
464 +index b47a6eb..0138d96 100644
465 +--- a/t/28-get_h_var.t
466 ++++ b/t/28-get_h_var.t
467 +@@ -13,7 +13,10 @@ plan( tests => 2 );
468 +
469 +
470 + #Top
471 +-use t::lib::Debugger;
472 ++BEGIN {
473 ++ require "./t/lib/Debugger.pm";
474 ++ t::lib::Debugger->import;
475 ++}
476 +
477 + start_script('t/eg/14-y_zero.pl');
478 + my $debugger;
479 +diff --git a/t/29-options.t b/t/29-options.t
480 +index 3b4b1ba..c41b165 100644
481 +--- a/t/29-options.t
482 ++++ b/t/29-options.t
483 +@@ -13,7 +13,10 @@ plan( tests => 4 );
484 +
485 +
486 + #Top
487 +-use t::lib::Debugger;
488 ++BEGIN {
489 ++ require "./t/lib/Debugger.pm";
490 ++ t::lib::Debugger->import;
491 ++}
492 +
493 + start_script('t/eg/14-y_zero.pl');
494 + my $debugger;
495 +diff --git a/t/40-test_1415-old.t b/t/40-test_1415-old.t
496 +index 22dd789..ce16241 100644
497 +--- a/t/40-test_1415-old.t
498 ++++ b/t/40-test_1415-old.t
499 +@@ -13,7 +13,10 @@ plan( tests => 12 );
500 +
501 +
502 + #Top
503 +-use t::lib::Debugger;
504 ++BEGIN {
505 ++ require "./t/lib/Debugger.pm";
506 ++ t::lib::Debugger->import;
507 ++}
508 +
509 + start_script('t/eg/test_1415.pl');
510 + my $debugger;
511 +diff --git a/t/40-test_1415.t b/t/40-test_1415.t
512 +index b7269a4..3b78280 100644
513 +--- a/t/40-test_1415.t
514 ++++ b/t/40-test_1415.t
515 +@@ -7,7 +7,10 @@ local $OUTPUT_AUTOFLUSH = 1;
516 + use FindBin qw($Bin);
517 + use lib map "$Bin/$_", 'lib', '../lib';
518 +
519 +-use t::lib::Test_1415;
520 ++BEGIN {
521 ++ require "./t/lib/Test_1415.pm";
522 ++ t::lib::Test_1415->import();
523 ++}
524 +
525 + # run all the test methods
526 + Test::Class->runtests;
527 +diff --git a/t/99-perldb.t b/t/99-perldb.t
528 +index 3cf3d66..2326149 100644
529 +--- a/t/99-perldb.t
530 ++++ b/t/99-perldb.t
531 +@@ -9,7 +9,10 @@ local $| = 1;
532 +
533 + use Test::More tests => 1;
534 +
535 +-use t::lib::Debugger;
536 ++BEGIN {
537 ++ require "./t/lib/Debugger.pm";
538 ++ t::lib::Debugger->import;
539 ++}
540 +
541 + if (rc_file) {
542 + diag('');
543 +diff --git a/t/lib/Test_1415.pm b/t/lib/Test_1415.pm
544 +index 9712d69..5aa23b4 100644
545 +--- a/t/lib/Test_1415.pm
546 ++++ b/t/lib/Test_1415.pm
547 +@@ -7,7 +7,10 @@ use parent qw(Test::Class);
548 + use Test::More;
549 + use Test::Deep;
550 +
551 +-use t::lib::Debugger;
552 ++BEGIN {
553 ++ require "./t/lib/Debugger.pm";
554 ++ t::lib::Debugger->import;
555 ++}
556 +
557 + # setup methods are run before every test method.
558 + sub load_debugger : Test(setup) {
559 +diff --git a/t/lib/Top_Tail.pm b/t/lib/Top_Tail.pm
560 +index 9fccf24..f5a01b0 100644
561 +--- a/t/lib/Top_Tail.pm
562 ++++ b/t/lib/Top_Tail.pm
563 +@@ -11,7 +11,8 @@ use Test::Deep;
564 + sub startup : Test(4) {
565 + my $self = shift;
566 +
567 +- use_ok( 't::lib::Debugger');
568 ++ require_ok('./t/lib/Debugger.pm');
569 ++ t::lib::Debugger->import;
570 + ok( start_script('t/eg/14-y_zero.pl'), 'start script' );
571 + ok( $self->{debugger} = start_debugger(), 'start debugger' );
572 + ok( $self->{debugger}->get, 'get debugger' );
573 +--
574 +2.13.1
575 +