1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/testing/ocaml-omod/fix-cache-dir.patch
rubicon 710c7456bf testing/ocaml-*: fix depends
testing/utop should now be installable without errors
2022-05-20 15:50:43 +00:00

13 lines
532 B
Diff

The default of "/usr/var/cache/omod" won't be writable by normal users
--- a/src/omod_support.ml
+++ b/src/omod_support.ml
@@ -680,7 +680,7 @@
let get_cache cache = match cache with
| Some l -> l | None ->
match get_env cache_env with
- | Some l -> l | None -> in_prefix_path ("var" / "cache" / "omod")
+ | Some l -> l | None -> (let tmp = Filename.get_temp_dir_name () in try tmp / ".omod-cache-" ^ Unix.getlogin () with _ -> tmp / ".omod-cache")
type t = { cache : Omod.fpath; libdir : Omod.fpath }