Commit b968ab46 authored by Ralf Jung's avatar Ralf Jung
Browse files

adjust to new-style package builddep name

parent 82035bb9
......@@ -55,6 +55,8 @@ fi
mkdir -p .git/info
cat >> .git/info/exclude <<EOF
ci/
builddep/
build-dep/
_opam/
build-env.txt
build-log.txt
......
......@@ -52,14 +52,17 @@ echo
if test -f opam; then
# Old-style package: a single opam file
make build-dep/opam
# Copy it to new-style location
mkdir -p builddep
cp build-dep/opam builddep/opam
else
# New-style package has a dedicated target to just generate the files
make build-dep-opamfiles
make builddep-opamfiles
fi
# Update old opam, if we got a cache.
if [[ -z "$FRESH_OPAM" ]]; then # skip if this is a fresh opam root
# Update repositories and reinit. build-dep/* must exist here because it
# Update repositories and reinit. builddep/* must exist here because it
# might be installed, and opam would complain if it had went missing.
opam init --no-setup --disable-sandboxing --reinit -y
# We need `opam update` anyway to update git branches.
......@@ -99,18 +102,18 @@ while (( "$#" )); do # while there are arguments left
done
echo
# Pin build-dep and install everything.
warn "[prepare-opam] Pinning and installing build-dep and upgrading everything"
if ! opam pin add -y -n build-dep/; then # we have to do this first, or `opam upgrade` cannot pick it up, see opam issue #3613.
panic "'pin add build-dep/' failed'"
# Pin builddep and install everything.
warn "[prepare-opam] Pinning and installing builddep and upgrading everything"
if ! opam pin add -y -n builddep/; then # we have to do this first, or `opam upgrade` cannot pick it up, see opam issue #3613.
panic "'pin add builddep/' failed'"
fi
# We would really like to do these two in one transaction, but that does not work -- see opam issue #3737.
# Also, we have to list the packages we pinned explicitly here, or else opam fails to upgrade them if they
# are pinned to a git branch (it ignores changes in the git branch) -- see opam issue #3727.
if ! opam upgrade -y build-dep/ $PINNED_PACKAGES; then
if ! opam upgrade -y builddep/ $PINNED_PACKAGES; then
echo "opam state:"
opam pin && opam list
panic "'opam upgrade build-dep/ $PINNED_PACKAGES' failed"
panic "'opam upgrade builddep/ $PINNED_PACKAGES' failed"
fi
opam upgrade -y
echo
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment