Improve make build-deps after a tezos-opam-repository update

First this patch makes build-deps non interactive as it should be.
More importantly, it changes the optimization problem sent to the
opam solver (and that may be a big deal).

By default the criteria is `-removed,-changed,-notuptodate`.

-changed is problematic because it means that if a dependency
has been updated in tezos-opam-repository but all tezos packages
are fine with the one currently installed, it is not changed (but
as we observe now there might still be in fact packages with
undeclared incompatible with this old version)!

-remove is also problematic because what we would like to say is
"minimize the number of removed 'root' packages" we don't care to
remove packages automatically installed and not necessary anymore
(especially when they don't compile anymore with updated version of
their deps...)

So... I reversed order in the criteria. I'm sure this is what I want
when the opam switch contains only tezos-opam-repository but
unexpected upgrades occur for devs that have done a
`opam repo add default --rank=-1`...
This commit is contained in:
Pierre Boutillier 2019-01-25 12:04:26 +01:00
parent 9fe22ef56c
commit 98076324bf
No known key found for this signature in database
GPG Key ID: C2F73508B56A193C

View File

@ -7,4 +7,4 @@ src_dir="$(dirname "$script_dir")"
opams=$(find "$src_dir/vendors" "$src_dir/src" -name \*.opam -print) opams=$(find "$src_dir/vendors" "$src_dir/src" -name \*.opam -print)
opam install $opams --deps-only --with-test opam install $opams --deps-only --with-test -y --criteria="-notuptodate,-changed,-removed"