Package: posh Version: 0.12.5 Tags: patch The tests/th Perl script is using perl4-specific 'getopts.pl' module for option parsing. As noted in [1], those modules are no longer included in perl since version 5.15. Therefore, an attempt to run tests results in the following error:
./th-sh ./th -s . -p ../posh -C sh,posix,pdksh,posh,debian,no-history,no-typeset,no-aliases,no-arrays,no-coprocs,no-herestrings,no-ulimit Can't locate getopts.pl in @INC (@INC contains: /etc/perl /usr/local/lib64/perl5/5.22.1/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.22.1 /usr/lib64/perl5/vendor_perl/5.22.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.22.1 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.22.0/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.22.0 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.22.1/x86_64-linux-thread-multi /usr/lib64/perl5/5.22.1 .) at ./th line 133. I am attaching a patch that fixes the issue by using the more modern Getopt::Std module that is part of Perl core distribution since perl-5.0. I've tested the resulting patch on Gentoo with perl-5.22.1. [1]:https://metacpan.org/pod/Perl4::CoreLibs -- Best regards, Michał Górny <http://dev.gentoo.org/~mgorny/>
From 893b644fc8c840d0a29974c90e0a80f7ce8146ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org> Date: Sun, 14 Feb 2016 10:21:02 +0100 Subject: [PATCH] tests/th: Update to work with perl-5.15+ The 'getopts.pl' module (dating back to perl4) was finally nuked in perl-5.16+, therefore making it impossible to run tests in posh. Use the perl5 Getopt::Std module instead. --- tests/th | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/th b/tests/th index 72eb812..920d54c 100755 --- a/tests/th +++ b/tests/th @@ -130,7 +130,7 @@ $os = defined $^O ? $^O : 'unknown'; -require 'getopts.pl'; +use Getopt::Std; ($prog = $0) =~ s#.*/##; @@ -200,7 +200,7 @@ $nxpassed = 0; %known_tests = (); -if (!&Getopts('C:p:Ps:t:ve:')) { +if (!&getopts('C:p:Ps:t:ve:')) { print STDERR $Usage; exit 1; } -- 2.7.1
pgpXx09JSgWFQ.pgp
Description: OpenPGP digital signature