0

A standard perl installation routine, e.g. for po4a 0.52 is

perl ./Build.PL PREFIX=/some/prefix
./Build installdeps
./Build
./Build install

how to avoid interaction with all of the commands, e.g.

Checking optional dependencies:
Install SGMLS? [y ]

during ./Build installdeps.

I'm using this in a system bootstrapping script on an almost empty docker image in a headless environment (GitLab CI service), so solutions with a smaller list of dependent steps is preferred or those with longer ones.

I know about tools like expect (or pexpect in python), but they're complicated and require quite some amount of bootstrapping. I could research the sequence of input that makes sense and read it from a file, but I'd like to avoid that if there's an easier solution, like an argument I can pass to Build. I found http://www.perlmonks.org/?node_id=1074554 which seems overly complicated.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
  • 1
    Running `./Build installdeps` is an unusual way to install dependencies?! Why can't you install your distribution via the normal cpan/cpanm tools? You could then select whether you want to install suggested dependencies via command-line parameter. – amon Feb 18 '18 at 20:31
  • 1
    There's an env var used by smokers. Don't remember what it is. – ikegami Feb 18 '18 at 21:14
  • 1
    And of course, tying stdin to /dev/null might do the trick. – ikegami Feb 18 '18 at 21:29
  • 2
    Does https://stackoverflow.com/a/11959600 help? – haukex Feb 18 '18 at 21:29

0 Answers0