1 |
commit: 0226fe3bebacd54f9a6d03bdb0caa9c92b6c63fb |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 6 23:33:46 2017 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 6 23:37:00 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0226fe3b |
7 |
|
8 |
dev-perl/ORLite: Fix failing tests without '.' in @INC |
9 |
|
10 |
- Remove parallelism as the tests all use a shared database file, |
11 |
which causes race conditions |
12 |
- Fix "." in @INC in tests exposed by Makefile.PL passing on 5.26 |
13 |
- Move Makefile.PL fix to patch |
14 |
|
15 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
16 |
|
17 |
dev-perl/ORLite/ORLite-1.980.0-r1.ebuild | 8 +- |
18 |
dev-perl/ORLite/files/ORLite-1.98-dot-in-inc.patch | 394 +++++++++++++++++++++ |
19 |
2 files changed, 396 insertions(+), 6 deletions(-) |
20 |
|
21 |
diff --git a/dev-perl/ORLite/ORLite-1.980.0-r1.ebuild b/dev-perl/ORLite/ORLite-1.980.0-r1.ebuild |
22 |
index aa3c2987168..f383462f6fa 100644 |
23 |
--- a/dev-perl/ORLite/ORLite-1.980.0-r1.ebuild |
24 |
+++ b/dev-perl/ORLite/ORLite-1.980.0-r1.ebuild |
25 |
@@ -30,9 +30,5 @@ DEPEND=" |
26 |
RDEPEND=" |
27 |
${COMMON_DEPEND} |
28 |
" |
29 |
- |
30 |
-src_prepare() { |
31 |
- sed -i -e 's/use inc::Module::Install::DSL/use lib q[.];\nuse inc::Module::Install::DSL/' Makefile.PL || |
32 |
- die "Can't patch Makefile.PL for 5.26 dot-in-inc" |
33 |
- perl-module_src_prepare |
34 |
-} |
35 |
+PATCHES=( "${FILESDIR}/${PN}-1.98-dot-in-inc.patch" ) |
36 |
+DIST_TEST="do" # Parallel tests broken |
37 |
|
38 |
diff --git a/dev-perl/ORLite/files/ORLite-1.98-dot-in-inc.patch b/dev-perl/ORLite/files/ORLite-1.98-dot-in-inc.patch |
39 |
new file mode 100644 |
40 |
index 00000000000..e08be4560ca |
41 |
--- /dev/null |
42 |
+++ b/dev-perl/ORLite/files/ORLite-1.98-dot-in-inc.patch |
43 |
@@ -0,0 +1,394 @@ |
44 |
+From 8dd424a2c96200a491bea293d38898f9703dfd56 Mon Sep 17 00:00:00 2001 |
45 |
+From: Kent Fredric <kentfredric@×××××.com> |
46 |
+Date: Fri, 7 Jul 2017 11:02:30 +1200 |
47 |
+Subject: [PATCH] Fix tests failing without '.' in @INC |
48 |
+ |
49 |
+Note: t/22_overlay.t seems to have some magical behaviour |
50 |
+where previously it loaded t/lib/TableOne.pm by *implication* during |
51 |
+ORLite construction. |
52 |
+ |
53 |
+The test code for this needs to be slightly augmented to retain |
54 |
+traditional semantics without radially overhauling the test code. |
55 |
+ |
56 |
+Bug: https://rt.cpan.org/Ticket/Display.html?id=122383 |
57 |
+--- |
58 |
+ Makefile.PL | 1 + |
59 |
+ t/01_compile.t | 2 +- |
60 |
+ t/02_basics.t | 2 +- |
61 |
+ t/03_fk.t | 2 +- |
62 |
+ t/04_readonly.t | 2 +- |
63 |
+ t/05_notables.t | 2 +- |
64 |
+ t/06_create.t | 2 +- |
65 |
+ t/07_pk.t | 2 +- |
66 |
+ t/08_prune.t | 2 +- |
67 |
+ t/09_badfile.t | 2 +- |
68 |
+ t/10_cleanup.t | 2 +- |
69 |
+ t/11_cleanup.t | 2 +- |
70 |
+ t/12_xs.t | 2 +- |
71 |
+ t/13_array_basics.t | 2 +- |
72 |
+ t/14_array_fk.t | 2 +- |
73 |
+ t/15_array_xs.t | 2 +- |
74 |
+ t/16_array_create.t | 2 +- |
75 |
+ t/17_cache.t | 2 +- |
76 |
+ t/18_update.t | 2 +- |
77 |
+ t/19_view.t | 2 +- |
78 |
+ t/20_shim.t | 2 +- |
79 |
+ t/21_normalize.t | 2 +- |
80 |
+ t/22_overlay.t | 10 ++++++---- |
81 |
+ t/23_unicode.t | 2 +- |
82 |
+ t/24_rowid.t | 2 +- |
83 |
+ t/25_blob.t | 2 +- |
84 |
+ 26 files changed, 31 insertions(+), 28 deletions(-) |
85 |
+ |
86 |
+diff --git a/Makefile.PL b/Makefile.PL |
87 |
+index 5a4610a..c762072 100644 |
88 |
+--- a/Makefile.PL |
89 |
++++ b/Makefile.PL |
90 |
+@@ -1,3 +1,4 @@ |
91 |
++use lib '.'; |
92 |
+ use inc::Module::Install::DSL 1.06; |
93 |
+ |
94 |
+ all_from lib/ORLite.pm |
95 |
+diff --git a/t/01_compile.t b/t/01_compile.t |
96 |
+index 9e8d053..05b1cd0 100644 |
97 |
+--- a/t/01_compile.t |
98 |
++++ b/t/01_compile.t |
99 |
+@@ -10,7 +10,7 @@ BEGIN { |
100 |
+ use Test::More tests => 3; |
101 |
+ |
102 |
+ require_ok( 'ORLite' ); |
103 |
+-require_ok( 't::lib::Test' ); |
104 |
++require_ok( './t/lib/Test.pm' ); |
105 |
+ |
106 |
+ is( |
107 |
+ $ORLite::VERSION, |
108 |
+diff --git a/t/02_basics.t b/t/02_basics.t |
109 |
+index 448e256..3f9df0d 100644 |
110 |
+--- a/t/02_basics.t |
111 |
++++ b/t/02_basics.t |
112 |
+@@ -11,7 +11,7 @@ BEGIN { |
113 |
+ |
114 |
+ use Test::More tests => 74; |
115 |
+ use File::Spec::Functions ':ALL'; |
116 |
+-use t::lib::Test; |
117 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
118 |
+ |
119 |
+ SCOPE: { |
120 |
+ # Test file |
121 |
+diff --git a/t/03_fk.t b/t/03_fk.t |
122 |
+index 7f5db26..88d57e1 100644 |
123 |
+--- a/t/03_fk.t |
124 |
++++ b/t/03_fk.t |
125 |
+@@ -9,7 +9,7 @@ BEGIN { |
126 |
+ |
127 |
+ use Test::More tests => 5; |
128 |
+ use File::Spec::Functions ':ALL'; |
129 |
+-use t::lib::Test; |
130 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
131 |
+ |
132 |
+ |
133 |
+ |
134 |
+diff --git a/t/04_readonly.t b/t/04_readonly.t |
135 |
+index c13fcd7..b918fc2 100644 |
136 |
+--- a/t/04_readonly.t |
137 |
++++ b/t/04_readonly.t |
138 |
+@@ -11,7 +11,7 @@ BEGIN { |
139 |
+ |
140 |
+ use Test::More tests => 13; |
141 |
+ use File::Spec::Functions ':ALL'; |
142 |
+-use t::lib::Test; |
143 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
144 |
+ |
145 |
+ SCOPE: { |
146 |
+ # Test file |
147 |
+diff --git a/t/05_notables.t b/t/05_notables.t |
148 |
+index a5772c5..5f0d867 100644 |
149 |
+--- a/t/05_notables.t |
150 |
++++ b/t/05_notables.t |
151 |
+@@ -11,7 +11,7 @@ BEGIN { |
152 |
+ |
153 |
+ use Test::More tests => 5; |
154 |
+ use File::Spec::Functions ':ALL'; |
155 |
+-use t::lib::Test; |
156 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
157 |
+ |
158 |
+ SCOPE: { |
159 |
+ # Test file |
160 |
+diff --git a/t/06_create.t b/t/06_create.t |
161 |
+index 9a2735a..cc2ba57 100644 |
162 |
+--- a/t/06_create.t |
163 |
++++ b/t/06_create.t |
164 |
+@@ -11,7 +11,7 @@ BEGIN { |
165 |
+ |
166 |
+ use Test::More tests => 25; |
167 |
+ use File::Spec::Functions ':ALL'; |
168 |
+-use t::lib::Test; |
169 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
170 |
+ |
171 |
+ |
172 |
+ |
173 |
+diff --git a/t/07_pk.t b/t/07_pk.t |
174 |
+index 49c85ad..072ffa3 100644 |
175 |
+--- a/t/07_pk.t |
176 |
++++ b/t/07_pk.t |
177 |
+@@ -9,7 +9,7 @@ BEGIN { |
178 |
+ |
179 |
+ use Test::More tests => 6; |
180 |
+ use File::Spec::Functions ':ALL'; |
181 |
+-use t::lib::Test; |
182 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
183 |
+ |
184 |
+ |
185 |
+ ##################################################################### |
186 |
+diff --git a/t/08_prune.t b/t/08_prune.t |
187 |
+index 9ea2ca8..ac95366 100644 |
188 |
+--- a/t/08_prune.t |
189 |
++++ b/t/08_prune.t |
190 |
+@@ -12,7 +12,7 @@ BEGIN { |
191 |
+ use Test::More tests => 7; |
192 |
+ use Test::Script; |
193 |
+ use File::Remove; |
194 |
+-use t::lib::Test; |
195 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
196 |
+ |
197 |
+ # Where the test file will be |
198 |
+ my $file = test_db(); |
199 |
+diff --git a/t/09_badfile.t b/t/09_badfile.t |
200 |
+index 4d3445e..cf43ff4 100644 |
201 |
+--- a/t/09_badfile.t |
202 |
++++ b/t/09_badfile.t |
203 |
+@@ -11,7 +11,7 @@ BEGIN { |
204 |
+ use Test::More tests => 2; |
205 |
+ use Test::Script; |
206 |
+ use File::Remove; |
207 |
+-use t::lib::Test; |
208 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
209 |
+ |
210 |
+ # Where the test file will be |
211 |
+ my $file = test_db(); |
212 |
+diff --git a/t/10_cleanup.t b/t/10_cleanup.t |
213 |
+index 75a3cf3..9683624 100644 |
214 |
+--- a/t/10_cleanup.t |
215 |
++++ b/t/10_cleanup.t |
216 |
+@@ -9,7 +9,7 @@ BEGIN { |
217 |
+ |
218 |
+ use Test::More tests => 2; |
219 |
+ use File::Spec::Functions ':ALL'; |
220 |
+-use t::lib::Test; |
221 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
222 |
+ |
223 |
+ |
224 |
+ ##################################################################### |
225 |
+diff --git a/t/11_cleanup.t b/t/11_cleanup.t |
226 |
+index 7ba7af1..6e95ff7 100644 |
227 |
+--- a/t/11_cleanup.t |
228 |
++++ b/t/11_cleanup.t |
229 |
+@@ -9,7 +9,7 @@ BEGIN { |
230 |
+ |
231 |
+ use Test::More tests => 4; |
232 |
+ use File::Spec::Functions ':ALL'; |
233 |
+-use t::lib::Test; |
234 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
235 |
+ |
236 |
+ |
237 |
+ ##################################################################### |
238 |
+diff --git a/t/12_xs.t b/t/12_xs.t |
239 |
+index 151b2ed..6a26730 100644 |
240 |
+--- a/t/12_xs.t |
241 |
++++ b/t/12_xs.t |
242 |
+@@ -19,7 +19,7 @@ BEGIN { |
243 |
+ } |
244 |
+ } |
245 |
+ use File::Spec::Functions ':ALL'; |
246 |
+-use t::lib::Test; |
247 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
248 |
+ |
249 |
+ |
250 |
+ |
251 |
+diff --git a/t/13_array_basics.t b/t/13_array_basics.t |
252 |
+index 71a3d54..62fb167 100644 |
253 |
+--- a/t/13_array_basics.t |
254 |
++++ b/t/13_array_basics.t |
255 |
+@@ -10,7 +10,7 @@ BEGIN { |
256 |
+ |
257 |
+ use Test::More tests => 71; |
258 |
+ use File::Spec::Functions ':ALL'; |
259 |
+-use t::lib::Test; |
260 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
261 |
+ |
262 |
+ SCOPE: { |
263 |
+ # Test file |
264 |
+diff --git a/t/14_array_fk.t b/t/14_array_fk.t |
265 |
+index fc898b0..842b33c 100644 |
266 |
+--- a/t/14_array_fk.t |
267 |
++++ b/t/14_array_fk.t |
268 |
+@@ -9,7 +9,7 @@ BEGIN { |
269 |
+ |
270 |
+ use Test::More tests => 5; |
271 |
+ use File::Spec::Functions ':ALL'; |
272 |
+-use t::lib::Test; |
273 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
274 |
+ |
275 |
+ |
276 |
+ |
277 |
+diff --git a/t/15_array_xs.t b/t/15_array_xs.t |
278 |
+index 97402c0..06d5b1b 100644 |
279 |
+--- a/t/15_array_xs.t |
280 |
++++ b/t/15_array_xs.t |
281 |
+@@ -19,7 +19,7 @@ BEGIN { |
282 |
+ } |
283 |
+ } |
284 |
+ use File::Spec::Functions ':ALL'; |
285 |
+-use t::lib::Test; |
286 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
287 |
+ |
288 |
+ |
289 |
+ |
290 |
+diff --git a/t/16_array_create.t b/t/16_array_create.t |
291 |
+index 817c72a..3123c0c 100644 |
292 |
+--- a/t/16_array_create.t |
293 |
++++ b/t/16_array_create.t |
294 |
+@@ -11,7 +11,7 @@ BEGIN { |
295 |
+ |
296 |
+ use Test::More tests => 25; |
297 |
+ use File::Spec::Functions ':ALL'; |
298 |
+-use t::lib::Test; |
299 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
300 |
+ |
301 |
+ |
302 |
+ |
303 |
+diff --git a/t/17_cache.t b/t/17_cache.t |
304 |
+index 5a64066..8472373 100644 |
305 |
+--- a/t/17_cache.t |
306 |
++++ b/t/17_cache.t |
307 |
+@@ -11,7 +11,7 @@ BEGIN { |
308 |
+ use Test::More tests => 9; |
309 |
+ use File::Spec::Functions ':ALL'; |
310 |
+ use File::Remove 'clear'; |
311 |
+-use t::lib::Test; |
312 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
313 |
+ |
314 |
+ # Where will the cache file be written to |
315 |
+ my $orlite_version = $t::lib::Test::VERSION; |
316 |
+diff --git a/t/18_update.t b/t/18_update.t |
317 |
+index 840f9c0..bf3eed6 100644 |
318 |
+--- a/t/18_update.t |
319 |
++++ b/t/18_update.t |
320 |
+@@ -9,7 +9,7 @@ BEGIN { |
321 |
+ |
322 |
+ use Test::More tests => 10; |
323 |
+ use File::Spec::Functions ':ALL'; |
324 |
+-use t::lib::Test; |
325 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
326 |
+ |
327 |
+ |
328 |
+ |
329 |
+diff --git a/t/19_view.t b/t/19_view.t |
330 |
+index d893b59..120d9e1 100644 |
331 |
+--- a/t/19_view.t |
332 |
++++ b/t/19_view.t |
333 |
+@@ -11,7 +11,7 @@ BEGIN { |
334 |
+ |
335 |
+ use Test::More tests => 81; |
336 |
+ use File::Spec::Functions ':ALL'; |
337 |
+-use t::lib::Test; |
338 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
339 |
+ |
340 |
+ # Set up again |
341 |
+ my $file = test_db(); |
342 |
+diff --git a/t/20_shim.t b/t/20_shim.t |
343 |
+index 7f47634..3868225 100644 |
344 |
+--- a/t/20_shim.t |
345 |
++++ b/t/20_shim.t |
346 |
+@@ -9,7 +9,7 @@ BEGIN { |
347 |
+ |
348 |
+ use Test::More tests => 12; |
349 |
+ use File::Spec::Functions ':ALL'; |
350 |
+-use t::lib::Test; |
351 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
352 |
+ |
353 |
+ |
354 |
+ |
355 |
+diff --git a/t/21_normalize.t b/t/21_normalize.t |
356 |
+index 2a6aa83..f703c64 100644 |
357 |
+--- a/t/21_normalize.t |
358 |
++++ b/t/21_normalize.t |
359 |
+@@ -11,7 +11,7 @@ BEGIN { |
360 |
+ |
361 |
+ use Test::More tests => 78; |
362 |
+ use File::Spec::Functions ':ALL'; |
363 |
+-use t::lib::Test; |
364 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
365 |
+ |
366 |
+ SCOPE: { |
367 |
+ # Test file |
368 |
+diff --git a/t/22_overlay.t b/t/22_overlay.t |
369 |
+index fca2faa..5848d61 100644 |
370 |
+--- a/t/22_overlay.t |
371 |
++++ b/t/22_overlay.t |
372 |
+@@ -9,7 +9,7 @@ BEGIN { |
373 |
+ |
374 |
+ use Test::More tests => 7; |
375 |
+ use File::Spec::Functions ':ALL'; |
376 |
+-use t::lib::Test; |
377 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
378 |
+ |
379 |
+ |
380 |
+ |
381 |
+@@ -30,9 +30,11 @@ eval <<"END_PERL"; die $@ if $@; |
382 |
+ package t::lib; |
383 |
+ |
384 |
+ use strict; |
385 |
+-use ORLite { |
386 |
+- file => '$file', |
387 |
+-}; |
388 |
++BEGIN { |
389 |
++ require ORLite; |
390 |
++ local \@INC=(\@INC, '.'); |
391 |
++ ORLite->import({ file => '$file' }); |
392 |
++} |
393 |
+ |
394 |
+ 1; |
395 |
+ END_PERL |
396 |
+diff --git a/t/23_unicode.t b/t/23_unicode.t |
397 |
+index a63d50f..b2be363 100644 |
398 |
+--- a/t/23_unicode.t |
399 |
++++ b/t/23_unicode.t |
400 |
+@@ -17,7 +17,7 @@ BEGIN { |
401 |
+ |
402 |
+ use utf8; |
403 |
+ use File::Spec::Functions ':ALL'; |
404 |
+-use t::lib::Test; |
405 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
406 |
+ |
407 |
+ |
408 |
+ |
409 |
+diff --git a/t/24_rowid.t b/t/24_rowid.t |
410 |
+index a5527f5..5104437 100644 |
411 |
+--- a/t/24_rowid.t |
412 |
++++ b/t/24_rowid.t |
413 |
+@@ -11,7 +11,7 @@ BEGIN { |
414 |
+ |
415 |
+ use Test::More tests => 51; |
416 |
+ use File::Spec::Functions ':ALL'; |
417 |
+-use t::lib::Test; |
418 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
419 |
+ |
420 |
+ # Set up the database |
421 |
+ my $file = test_db(); |
422 |
+diff --git a/t/25_blob.t b/t/25_blob.t |
423 |
+index 75aa607..b0bdf06 100644 |
424 |
+--- a/t/25_blob.t |
425 |
++++ b/t/25_blob.t |
426 |
+@@ -9,7 +9,7 @@ BEGIN { |
427 |
+ } |
428 |
+ use Test::More; |
429 |
+ use File::Spec::Functions ':ALL'; |
430 |
+-use t::lib::Test; |
431 |
++BEGIN { require "./t/lib/Test.pm"; t::lib::Test->import() } |
432 |
+ |
433 |
+ |
434 |
+ |
435 |
+-- |
436 |
+2.13.1 |
437 |
+ |