99 lines
3.5 KiB
Diff
99 lines
3.5 KiB
Diff
From f8774efbe02d3651cde449333cf108e79adba48c Mon Sep 17 00:00:00 2001
|
|
From: Kate <kit.ty.kate@disroot.org>
|
|
Date: Wed, 16 Nov 2022 19:30:01 +0000
|
|
Subject: [PATCH 2/5] Add support for OCaml 5.0
|
|
|
|
---
|
|
src/mode_build.ml | 4 ++--
|
|
src/supermin.ml | 16 ++++++++--------
|
|
src/utils.ml | 4 ++--
|
|
3 files changed, 12 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/mode_build.ml b/src/mode_build.ml
|
|
index 7c48295..f81341d 100644
|
|
--- a/src/mode_build.ml
|
|
+++ b/src/mode_build.ml
|
|
@@ -123,7 +123,7 @@ let rec build debug
|
|
(PackageSet.cardinal packages);
|
|
if debug >= 2 then (
|
|
List.iter (printf " - %s\n") pretty_packages;
|
|
- flush Pervasives.stdout
|
|
+ flush Stdlib.stdout
|
|
)
|
|
);
|
|
|
|
@@ -207,7 +207,7 @@ let rec build debug
|
|
(List.length files);
|
|
if debug >= 2 then (
|
|
List.iter (fun { ft_path = path } -> printf " - %s\n" path) files;
|
|
- flush Pervasives.stdout
|
|
+ flush Stdlib.stdout
|
|
)
|
|
);
|
|
|
|
diff --git a/src/supermin.ml b/src/supermin.ml
|
|
index 659e857..bef9db6 100644
|
|
--- a/src/supermin.ml
|
|
+++ b/src/supermin.ml
|
|
@@ -296,27 +296,27 @@ let () =
|
|
main ()
|
|
with
|
|
| Unix.Unix_error (code, fname, "") -> (* from a syscall *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "error: %s: %s" fname (Unix.error_message code)
|
|
| Unix.Unix_error (code, fname, param) -> (* from a syscall *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "error: %s: %s: %s" fname (Unix.error_message code) param
|
|
| Failure msg -> (* from failwith/failwithf *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "failure: %s" msg
|
|
| Librpm.Multiple_matches (package, count) -> (* from librpm *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "RPM error: %d occurrences for %s" count package
|
|
| Invalid_argument msg -> (* probably should never happen *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "internal error: invalid argument: %s" msg
|
|
| Assert_failure (file, line, char) -> (* should never happen *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "internal error: assertion failed at %s, line %d, char %d"
|
|
file line char
|
|
| Not_found -> (* should never happen *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "internal error: Not_found exception was thrown"
|
|
| exn -> (* something not matched above *)
|
|
- Printexc.print_backtrace Pervasives.stderr;
|
|
+ Printexc.print_backtrace Stdlib.stderr;
|
|
error "exception: %s" (Printexc.to_string exn)
|
|
diff --git a/src/utils.ml b/src/utils.ml
|
|
index 521d49e..ae99294 100644
|
|
--- a/src/utils.ml
|
|
+++ b/src/utils.ml
|
|
@@ -40,7 +40,7 @@ let dir_exists name =
|
|
try (stat name).st_kind = S_DIR
|
|
with Unix_error _ -> false
|
|
|
|
-let uniq ?(cmp = Pervasives.compare) xs =
|
|
+let uniq ?(cmp = Stdlib.compare) xs =
|
|
let rec loop acc = function
|
|
| [] -> acc
|
|
| [x] -> x :: acc
|
|
@@ -51,7 +51,7 @@ let uniq ?(cmp = Pervasives.compare) xs =
|
|
in
|
|
List.rev (loop [] xs)
|
|
|
|
-let sort_uniq ?(cmp = Pervasives.compare) xs =
|
|
+let sort_uniq ?(cmp = Stdlib.compare) xs =
|
|
let xs = List.sort cmp xs in
|
|
let xs = uniq ~cmp xs in
|
|
xs
|
|
--
|
|
2.37.3
|
|
|