diff options
Diffstat (limited to 'testing/ocaml-omod/fix-cache-dir.patch')
-rw-r--r-- | testing/ocaml-omod/fix-cache-dir.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/ocaml-omod/fix-cache-dir.patch b/testing/ocaml-omod/fix-cache-dir.patch new file mode 100644 index 00000000000..08e3ca36480 --- /dev/null +++ b/testing/ocaml-omod/fix-cache-dir.patch @@ -0,0 +1,13 @@ +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 } + |