Bug 8485 - Make koha_perl_deps.pl batch friendly
Summary: Make koha_perl_deps.pl batch friendly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-20 18:26 UTC by Tomás Cohen Arazi
Modified: 2013-05-23 06:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
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. (3.91 KB, patch)
2012-07-31 15:21 UTC, M. Tompsett
Details | Diff | Splinter 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. (3.97 KB, patch)
2012-08-01 13:35 UTC, Tomás Cohen Arazi
Details | Diff | Splinter 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. (3.98 KB, patch)
2012-08-03 15:43 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 M. 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 M. Tompsett 2012-07-31 15:21:40 UTC Comment hidden (obsolete)
Comment 3 M. 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 M. 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?