Bug#790422: Parsing.Parse_error
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.
Regards,
--
Mehdi
diff -ruNd dose3-4.1/myocamlbuild.ml.pp new/myocamlbuild.ml.pp
--- dose3-4.1/myocamlbuild.ml.pp 2016-01-04 12:53:12.000000000 +0100
+++ new/myocamlbuild.ml.pp 2016-01-20 01:12:10.231339730 +0100
@@ -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";
diff -ruNd dose3-4.1/Makefile.config.in new/Makefile.config.in
--- dose3-4.1/Makefile.config.in 2016-01-04 12:53:12.000000000 +0100
+++ new/Makefile.config.in 2016-01-20 01:05:53.328459693 +0100
@@ -4,7 +4,8 @@
CFLAGS=@CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long -warn-error FPSXY
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
-CPPOFLAGS=-V OCAML:$(shell ocamlc -version)
+#CPPOFLAGS=-V OCAML:$(shell ocamlc -version)
+CPPOFLAGS=
OCAMLFIND=@OCAMLFIND@
diff -ruNd dose3-4.1/algo/diagnostic.ml new/algo/diagnostic.ml
--- dose3-4.1/algo/diagnostic.ml 2016-01-04 12:53:12.000000000 +0100
+++ new/algo/diagnostic.ml 2016-01-20 00:28:32.881700239 +0100
@@ -525,8 +525,7 @@
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 -ruNd dose3-4.1/algo/dominators.ml new/algo/dominators.ml
--- dose3-4.1/algo/dominators.ml 2016-01-04 12:53:12.000000000 +0100
+++ new/algo/dominators.ml 2016-01-20 00:24:18.161312088 +0100
@@ -101,11 +105,11 @@
) 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 -ruNd dose3-4.1/applications/distcheck.ml new/applications/distcheck.ml
--- dose3-4.1/applications/distcheck.ml 2016-01-04 12:53:12.000000000 +0100
+++ new/applications/distcheck.ml 2016-01-20 00:55:15.690760013 +0100
@@ -24,7 +24,7 @@
open OptParse
open OptParser
let description = "Compute the list broken packages in a repository"
- let options = OptParser.make ~description
+ let options ?usage:(usage="") ?status:(status=0) = OptParser.make ~usage ~description
include StdOptions.MakeOptions(struct let options = options end)
let coinst = StdDebian.vpkglist_option ();;
diff -ruNd dose3-4.1/common/criteria_lexer.mll new/common/criteria_lexer.mll
--- dose3-4.1/common/criteria_lexer.mll 2016-01-04 12:53:12.000000000 +0100
+++ new/common/criteria_lexer.mll 2016-01-20 00:20:49.609185831 +0100
@@ -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 *)
Reply to: