Bug 8485

Summary: Make koha_perl_deps.pl batch friendly
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Installation and upgrade (command-line installer)Assignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, kyle, mtompset, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Added -b and -r options to koha_perl_deps.pl, fixed up help information.
Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries.
Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries.

Description Tomás Cohen Arazi 2012-07-20 18:26:42 UTC
I propose adding a switch to the koha_perl_deps.pl script so it is more batch friendly. I propose -B (for batch) and make it output just the library name, preserving the other switches semantics.

It could be useful to do things like:

for k in $(for i in $(./koha_perl_deps.pl -m -B | perl -pi -e 's/::/-/g' | tr '[A-Z]' '[a-z]')
  do
    echo lib$i-perl
  done)
do
 apt-cache search $k
done

(fix it) to maintain a list of debian packages needed, and stuff like that.
Comment 1 Mark Tompsett 2012-07-28 08:15:53 UTC
I'd suggestion -b, since hitting shift is an extra key. ;)

Additionally, a -r for "Required = Yes" type modules only.

I'm working on this, but I am not able to submit patches, as I'm working on this under CentOS. :) See bug 8517. It is related, but not required for this.
Comment 2 Mark Tompsett 2012-07-31 15:21:40 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2012-07-31 15:24:20 UTC
I set the version to unspecified, as this patch applies to 3.6.x, 3.8.x, AND master. Let me know if there are any problems.
Comment 4 Tomás Cohen Arazi 2012-08-01 13:35:17 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2012-08-03 15:43:49 UTC
Created attachment 11342 [details] [review]
Bug 8485 - Make koha_perl_deps.pl batch friendly Added a -b flag for brief which outputs only the perl library name (Foo::BaR), and added a -r flag for required which filters the list to required=Yes perl libraries.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Jonathan Druart 2012-08-09 09:14:47 UTC
QA comments:
Works as expected, marked as Passed QA
Comment 7 Paul Poulain 2012-08-31 15:36:34 UTC
Patch pushed

chris_c = Could be worth porting it to 3.8
Comment 8 Mark Tompsett 2012-08-31 16:08:37 UTC
I know with 3.10 out in November that 3.6.x will approach EOL, but perhaps 3.6.x too?