Unattended installation support
| From: | Nitzan Raz | Date: | Sun, 10 May 2015 14:38:23 +0000 |
| Subject: | Unattended installation support | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-32024@lists.php.net to get a copy of this message | ||
Hi
I'm trying to automate PECL / PEAR installation with Chef.
It all works well except when I need to modify the defaults for a certain
build option (in my case, something with "pecl_http".
All of the answers I found talk about piping input into the
pear command,
which seems sort of a last resort, since I end up with piping something
like:
```
yes
no
yes
/usr
```
Very sketchy.
The problematic code is at in Builder.php L32
<https://github.com/pear/pear-core/blob/stable/PEAR/Builder.php#L322>,
where it parses configuration options and displays a user dialog for each
one. I think it should also accept input from CLI arguments (best),
environment variables or some answer file.
I can see one problem with this - since several packages might be installed
at the same run, I might need to make sure configuration options don't
"leak", perhaps by rejecting these options when more than one package is
specified.
I'd appreciate your sage opinion on this matter (perhaps there's a good
reason it's not implemented)
Thanks!
*Nitzan Raz*
http://backslasher.net