Do a quick test *before* building the JSON object to check it is really needed
Map.map{,i} should be tail-recursive
Expose an API for parallel computation on lists
Refactor OpamPath API and fix its documentation
OpamRepository.pull_url now takes a full package as debug argument (instead of just a name)
Remove dead-code in OpamRepository

And use the new API from OpamPackage, OpamCompiler and OpamParallel modules
Shuffle around the State.Types.t type definition

Also, remove some not-so-useful caches in there (as prefixes) and lazyfy some other ones (such as packages_index and compiler_index).
OpamState API refactoring

Now use is_xxx_installed to know if a compiler/switch/package//name is installed.
Add an optional root argument to OpamFilename.copy_in

This make it easier to recopy subdirectories.
Refactor the 'a update type.
Harder Better Safer 'opam update'

In OPAM 1.0, we were relying on each repository backend to tell us what the upgrade were. This was making the implementation of a new backend a little bit a pain (not it is really trivial) and was not very robust to occasional errors.

In the previous `master` version of OPAM, we were starting to compare the 'global' state (eg. what were in ~/.opam/opam, ~/.opam/desc ~/.opam/archives) with the 'repository' state (eg. what were in ~/.opam/repo/<repo>/packages/XXX/<package>). But we didn't have all the information we needed in the global state (for instance, we didn't know about urls, and additional files), the name of the files were changing, and so on.

So now, after a summer cleaning, and because now all the states ars stored globally, it is much easier and to compute the difference between the repository state and the global state, and to fix these properly and to tell the user. This is *much* more robust and simple than before.

Also, less caching (although we might add one back later if needed) so more deterministic results and simpler code.
Remove dead-code in OpamHTTP
Add a global hook to tell OPAM ignore the files eventually added by the packages

The hook is enabled if OPAMDONOTCOPYFILES is set to a non-empty value.

The hook is not used yet.
Dev packages should live in the global state

Currently the temporary files for dev packages are stored in the repository states (~/.opam/repo/<repo>/tmp/<package>/), and this has caused much trouble (and make the code painfully complex). The the natural place for these file is the global state, under ~/.opam/packages.dev/<package>.

Now, all the metadata and data associated to a packages is stored in the global state; the only time we need to compute in which repo a package belongs to is when we want to download any associated `name.version+opam.tar.gz` archive: in this case we need to triger the right OpamRepository.pull_archive function.
Fix compilation of scripts
Improve the messages on 'opam update'
Improve the messages on 'opam upgrade'
When creating a tempory file, check if the file already exist.

This can be a bit racy in case of concurrent creation of temporary files, but well ...
Expose OpamRepositoryCommand.fix_descriptions
Remove OpamPath.root (which was the identity function)