On 2016-01-20 01:14, Mehdi Dogguy wrote:
Hi,
On 19/01/2016 23:07, Christoph Berg wrote:
Long story, but that's the real-world example here. In fact I'm
considering upgrading the apt.pg.o build host to stretch just because
of this bugfix, and because a backport of the current dose-debcheck
version to jessie looks too hard.
After seeing your message, I was curious and tried to backport it. I
still
didn't get it to compile because of some weird OCaml feature but I
think
all what is left to do is to backport extlib (which is easy).
See file attached. Changes in "applications/distcheck.ml" should not be
kept. That's the part that will require a newer Extlib if a workaround
cannot
be found.
Updated patch, without the changes in "applications/distcheck.ml".
Regards,
--
M
diff --git a/Makefile.config.in b/Makefile.config.in
index 8d3496b..8fdda2d 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -4,7 +4,7 @@ NAME=@PACKAGE_NAME@
CFLAGS=@CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long -warn-error FPSXY
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
-CPPOFLAGS=-V OCAML:$(shell ocamlc -version)
+CPPOFLAGS=
OCAMLFIND=@OCAMLFIND@
diff --git a/algo/diagnostic.ml b/algo/diagnostic.ml
index 1ddd728..5ffb920 100644
--- a/algo/diagnostic.ml
+++ b/algo/diagnostic.ml
@@ -525,8 +525,7 @@ let print_error ?(condense=false) ?(minimal=false) pp root
fmt l =
open Defaultgraphs.SyntacticDependencyGraph
type label = G.E.label
type t = int
- type edge = G.E.t
- let weight e = match G.E.label e with { contents = PkgE.Conflict _ } ->
1000 | _ -> 0
+ let weight e = match !e with PkgE.Conflict _ -> 1000 | _ -> 0
let compare = Pervasives.compare
let add = (+)
let zero = 0
diff --git a/algo/dominators.ml b/algo/dominators.ml
index d7be032..872f03c 100644
--- a/algo/dominators.ml
+++ b/algo/dominators.ml
@@ -101,11 +101,7 @@ let dominators_tarjan graph =
) graph;
Util.Timer.start tjntimer;
-#if OCAMLGRAPHVERSION <= 186
- let module Dom = Dominator.Make_graph(G) in
-#else
let module Dom = Dominator.Make(G) in
-#endif
let idom = Dom.compute_all graph start_pkg in
let domgr = idom.Dom.dom_graph () in
Util.Timer.stop tjntimer ();
diff --git a/common/criteria_lexer.mll b/common/criteria_lexer.mll
index 5518fa0..33c57bc 100644
--- a/common/criteria_lexer.mll
+++ b/common/criteria_lexer.mll
@@ -13,6 +13,11 @@
{
open Criteria_parser
+ module Bytes = struct
+ include String
+ let sub_string = String.sub
+ end
+
let get_regexp lexbuf =
let open Lexing in
let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any
character *)
diff --git a/myocamlbuild.ml.pp b/myocamlbuild.ml.pp
index e0283cc..60f6fcd 100644
--- a/myocamlbuild.ml.pp
+++ b/myocamlbuild.ml.pp
@@ -2,11 +2,6 @@
open Ocamlbuild_plugin;;
Options.use_ocamlfind := true ;;
-#if OCAML_VERSION > (4, 1, 0)
-Ocamlbuild_pack.Flags.mark_tag_used "use_" ;;
-Ocamlbuild_pack.Flags.mark_tag_used "pkg_" ;;
-Ocamlbuild_pack.Flags.mark_tag_used "link_" ;;
-#endif
let modules_dirs = [
"common"; "versioning"; "pef"; "opam"; "deb"; "opencsw"; "rpm"; "algo";