Merge pull request #374 from tuong/master

we continue 7fcfe9c5ae746fe694f9fcab4d3f0fff3db84f42
Clean-ups in the tests:

* the build scripts now fail properly on build error
* the final test to check wgether compiler env variables works is more robust
Really fix #349 and #262

We really need to use files here, as the parent will not consider running childs and will only look for their termination before eventually reading the marshaled error. If we use a normal pipe, this could easily to lead to dead-locks, as pointed out by @tuong.

This fix re-add the initial temporary file (but this time, they are simply in ~/.opam/logs and really unique).

So this commit partially revert 92c8d8501b70bd1ffe85b4e3cb4d1c3c8bb48a98, 7fcfe9c5ae746fe694f9fcab4d3f0fff3db84f42 and 006293e1f8bfb317dab59308cabe4363c6b67675. Partially because it keeps the good idea of truncating the output in case either stderr or stdout are too long.

So this commit greatly improve the user experience when there is a compilatin error. The location of full logs is showed in case the truncated lines are not enough to solve the problem.
Add a --fake option.

Using this mode, OPAM will work in a simulation mode where all the build/install will be simulated.  This will *greatly* help debugging weird solver behavior (if any).

BEWARE: do not mix --fake commands with normal commands within the same compiler switch: this will definitely corrupt the state of OPAM. So use this wonderful option with care :-)
Update CHANGES
Update completion script for zsh
Merge branch 'master' of github.com:OCamlPro/opam
Update the way to get the list of sub-commands
Merge pull request #379 from cago/master

Update completion script for zsh
Register all the printers in one place (eg. in OpamSystem)
Improve the output of opam-mk-error on error.

This should help debugging #378
Do not use spawn a shell to do redirect when creating index.tar.gz. Apparently it can fail on some system and tar simply accepts an output file as argument.

This should fix #378
Merge branch 'master' of github.com:OCamlPro/opam
Fix typo. This should really fix #378
Improvements to opam-mk-repo.

* Warn when skipping non-existant packages.
* Do nothing if the user has provided no valid packages.
* Be more robust when trying to create index.tar.gz or urls.txt in empty repositories (ie. do nothing in this case).
Add the build flags to 'opam import'
Import/export the root packages as well.
'opam remove' should behave nicely when using with --fake
Installed packages are always available.

This means that you can remove a repository and continue to use the packages normally as long as they are installed. Once uninstalled (because of upgrade/remove), then they will disapear.

This should fix #309
Refactoring, no semantic changes