Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 615704 - <dev-perl/Template-Toolkit-0.270.0-r1: Template::Provider::_load_compiled broken with relative paths without '.' in @INC (Tests fail with Can't locate t/test/src/baz.ttc in @INC)
Summary: <dev-perl/Template-Toolkit-0.270.0-r1: Template::Provider::_load_compiled bro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Perl team
URL: https://rt.cpan.org/Ticket/Display.ht...
Whiteboard:
Keywords: TESTFAILURE
Depends on: 648794
Blocks: perl-5.26-no-dot-inc
  Show dependency tree
 
Reported: 2017-04-16 02:37 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2018-04-20 07:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-04-16 02:37:44 UTC
t/compile2.t .......... Use of uninitialized value $compiled in concatenation (.) or string at lib/Template/Provider.pm line 572.
compiled template : Can't locate t/test/src/baz.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571.ncatenation (.) or string at lib/Template/Provider.pm line 572, <DATA> chunk 1.
compiled template : Can't locate t/test/src/foo.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571, <DATA> chunk 1.
Use of uninitialized value $compiled in concatenation (.) or string at lib/Template/Provider.pm line 572.
compiled template : Can't locate t/test/src/complex.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571.Template/Provider.pm line 572.
compiled template : Can't locate t/test/src/divisionbyzero.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571.
t/compile2.t .......... Failed 2/15 subtests
t/compile3.t .......... Use of uninitialized value $compiled in concatenation (.) or string at lib/Template/Provider.pm line 572.
compiled template : Can't locate t/test/src/evalperl.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571.emplate/Provider.pm line 572.
compiled template : Can't locate t/test/src/evalperl.ttc in @INC (@INC contains: ./lib ../lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/lib /var/tmp/portage/dev-perl/Template-Toolkit-2.260.0/work/Template-Toolkit-2.26/blib/arch /etc/perl /usr/local/lib64/perl5/5.25.11/x86_64-linux /usr/local/lib64/perl5/5.25.11 /usr/lib64/perl5/vendor_perl/5.25.11/x86_64-linux /usr/lib64/perl5/vendor_perl/5.25.11 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.3 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.25.11/x86_64-linux /usr/lib64/perl5/5.25.11) at lib/Template/Provider.pm line 571.
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2018-01-13 08:39:31 UTC
Yeah, this has runtime implications.

--
sub _load_compiled {
    my ($self, $file) = @_;

    # load compiled template via require();  we zap any
    # %INC entry to ensure it is reloaded (we don't
    # want 1 returned by require() to say it's in memory)
    delete $INC{ $file };
    eval { $compiled = require $file; };
    return $@
--

Fixing this for Unix is mostly straight forward (kinda), just making a platform agnostic patch for upstream is messy.
Comment 2 Larry the Git Cow gentoo-dev 2018-01-14 17:22:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da0f714f5d4ca194ca32b106b635577f9d601e38

commit da0f714f5d4ca194ca32b106b635577f9d601e38
Author:     Kent Fredric <kentnl@gentoo.org>
AuthorDate: 2018-01-14 17:21:15 +0000
Commit:     Kent Fredric <kentnl@gentoo.org>
CommitDate: 2018-01-14 17:22:02 +0000

    dev-perl/Template-Toolkit: Add fix for '.' in @INC bug #615704
    
    - Add runtime fix for '.' in @INC problems
    - Patch tests for CGI.pm warnings
    
    Bug: https://bugs.gentoo.org/615704
    Package-Manager: Portage-2.3.18, Repoman-2.3.6

 .../Template-Toolkit-2.270.0-r1.ebuild             | 49 ++++++++++++++++
 .../files/Template-Toolkit-2.27-cgipm.patch        | 66 ++++++++++++++++++++++
 .../files/Template-Toolkit-2.27-no-dot-inc.patch   | 54 ++++++++++++++++++
 3 files changed, 169 insertions(+)}
Comment 3 Larry the Git Cow gentoo-dev 2018-04-20 07:14:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a43e21d613f78dee77ef6820127ca17dc74462a

commit 4a43e21d613f78dee77ef6820127ca17dc74462a
Author:     Kent Fredric <kentnl@gentoo.org>
AuthorDate: 2018-04-20 07:13:43 +0000
Commit:     Kent Fredric <kentnl@gentoo.org>
CommitDate: 2018-04-20 07:13:43 +0000

    dev-perl/Template-Toolkit: Cleanup old re bug #615704
    
    Closes: https://bugs.gentoo.org/615704
    Package-Manager: Portage-2.3.29, Repoman-2.3.9

 dev-perl/Template-Toolkit/Manifest                 |  1 -
 .../Template-Toolkit-2.260.0.ebuild                | 36 -------------------
 .../Template-Toolkit-2.270.0.ebuild                | 42 ----------------------
 3 files changed, 79 deletions(-)