Summary: | Example uses perl 5.8 in Makefile.PL | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
Component: | Installation and upgrade (command-line installer) | Assignee: | Mark Tompsett <mtompset> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | trivial | ||
Priority: | P5 - low | CC: | chris, kyle, paul.poulain |
Version: | 3.8 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Changed hardcoded path for a programmatic one.
Changed hardcoded path for a programmatic one. [SIGNED-OFF] Bug 8742 - Example uses perl 5.8 in Makefile.PL |
Description
Mark Tompsett
2012-09-09 07:11:27 UTC
Created attachment 12079 [details] [review] Changed hardcoded path for a programmatic one. Changed hardcoded /usr/share/perl/5.8 message to be based on: my @version = grep /\/usr\/share\/perl\//, @INC; By doing a push @version, ('/usr/share/perl/5.10') if !$version[0]; If inexplicably the grep fails or @INC is empty, then there is a reasonable default value. print "\nperl Makefile.PL PERL_MODULE_DIR=$version[0]\n\n"; Created attachment 12143 [details] [review] Changed hardcoded path for a programmatic one. Accidentally uploaded wrong version of the patch. Previous version didn't work in the case that /usr/share/perl/ wasn't in the @INC. This one does. Test case (before patch): /usr/share/perl/5.8 is printed. Test case (normally): /usr/share/perl/ should be in @INC, that version should print. Just hold down the enter key on 'perl Makefile.PL' Test case (bizarre): I purposefully inserted a @version=(); to force the push to execute. Because the only case where perl wouldn't have /usr/share/perl/ in the @INC is some strange OS with a non-standard perl configuration (like Windows ;) ). I then removed @version=(); after. Printing /usr/share/perl/5.10 is no worse than /usr/share/perl/5.8 in that context. It's just the 5.10 is more accurate version wise. Created attachment 12437 [details] [review] [SIGNED-OFF] Bug 8742 - Example uses perl 5.8 in Makefile.PL Changed hardcoded path for a programmatic one. Basing it on: grep /\/usr\/share\/perl\//, @INC; And doing a: push @version, ('/usr/share/perl/5.10') if !$version[0]; For a reasonable default otherwise. No more references to /usr/share/perl/5.8 hardcoded into the output. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> QA comment * installer-only script * doc only passes QA Patch pushed to master (pushed 2 days ago, I forgot to update the status) Pushed to 3.8.x will be in 3.8.12 |