Skip to content

Commit

Permalink
admin repo upgrape: add env path rewritable on windows field
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Aug 18, 2023
1 parent d29dc13 commit c49d5bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client/opamAdminRepoUpgrade.ml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ let do_upgrade repo_root =
"CAML_LD_LIBRARY_PATH", PlusEq, "%{lib}%/stublibs", None;
"OCAML_TOPLEVEL_PATH", Eq, "%{toplevel}%", None;
] |>
O.with_extensions
(OpamStd.String.Map.singleton OpamFile.OPAM.rewrite_xfield
(OpamTypesBase.nullify_pos (OpamParserTypes.FullPos.Bool true))) |>
(* leave the Compiler flag to the implementations (since the user
needs to select one)
O.with_flags [Pkgflag_Compiler] |> *)
Expand Down
2 changes: 2 additions & 0 deletions tests/reftests/admin.test
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ src: "file://${BASEDIR}/old-comp.1.2.tgz"
checksum: "md5=HASH
}
### opam-cat packages/ocaml/ocaml.1.2/opam
available: opam-version >= "2.2"
build: ["ocaml" "-I" "+unix" "unix.cma" "gen_ocaml_config.ml"]
build-env: CAML_LD_LIBRARY_PATH = ""
depends: ["ocaml-base-compiler" {= "1.2"} | "ocaml-variants" {>= "1.2" & < "1.3~"} | "ocaml-system" {= "1.2"}]
Expand All @@ -110,6 +111,7 @@ opam-version: "2.0"
setenv: [[CAML_LD_LIBRARY_PATH = "%{_:stubsdir}%"] [CAML_LD_LIBRARY_PATH += "%{lib}%/stublibs"] [OCAML_TOPLEVEL_PATH = "%{toplevel}%"]]
substs: "gen_ocaml_config.ml"
synopsis: "The OCaml compiler (virtual package)"
x-allow-env-path-rewrite-on-windows: true
### cat packages/ocaml/ocaml.1.2/files/gen_ocaml_config.ml.in
let () =
let ocaml_version =
Expand Down

0 comments on commit c49d5bd

Please sign in to comment.