flaviamissi/basebuilder — pull request #9 by guestisp (2014-01-21 12:28:19+00:00)
Title: Add support for enabling apache modules in PHP platform

Partially fix https://github.com/globocom/tsuru/issues/685
Fix https://github.com/globocom/tsuru/issues/682
Fix https://github.com/globocom/tsuru/issues/688

But introduce 1 bug:
- output from "deploy" script is not wrote sequentilly, for example:

remote: Hello world!
remote:
remote:
remote:
remote: ========================================
remote: Parsing Hooks
remote: ========================================
remote:
remote: Running hook: echo "Hello world!"
remote: Done executing hooks.
remote: * Restarting web server apache2
remote: ...done.
remote:
remote:
remote:
remote: ========================================
remote: Parsing Apache modules to enable
remote: ========================================
remote:
remote: Installing Apache module rewrite
remote: Done enabling Apache modules.

"Hello word" is an hook, defined in app.yaml:

$ cat app.yaml
apache:
modules:
- rewrite

hooks:
build:
- echo "Hello world!"

and it should be run after line

remote: Parsing Hooks

defined inside hook.py and not at the first output line

remote: * Restarting web server apache2

is a restart done by apache_modules.py and should be wrote after

remote: Parsing Apache modules to enable