Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-findlib for openSUSE:Factory 
checked in at 2022-05-26 18:44:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-findlib (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-findlib.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-findlib"

Thu May 26 18:44:06 2022 rev:13 rq:979310 version:1.9.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-findlib/ocaml-findlib.changes      
2022-04-06 21:51:31.447544767 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-findlib.new.2254/ocaml-findlib.changes    
2022-05-26 18:44:14.001190092 +0200
@@ -1,0 +2,6 @@
+Tue Apr 26 13:12:14 UTC 2022 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to version 1.9.3
+  * Fixes another build problem regarding OCaml-5.00
+
+-------------------------------------------------------------------

Old:
----
  findlib-1.9.2.tar.xz

New:
----
  findlib-1.9.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-findlib.spec ++++++
--- /var/tmp/diff_new_pack.PdtSfQ/_old  2022-05-26 18:44:14.417190577 +0200
+++ /var/tmp/diff_new_pack.PdtSfQ/_new  2022-05-26 18:44:14.421190582 +0200
@@ -18,14 +18,14 @@
 
 
 Name:           ocaml-findlib
-Version:        1.9.2
+Version:        1.9.3
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        Objective CAML package manager and build helper
 License:        MIT
 Group:          Development/Languages/OCaml
-BuildRoot:      %_tmppath/%name-%version-build
-Url:            https://github.com/ocaml/ocamlfind
+URL:            https://github.com/ocaml/ocamlfind
+#SourceURL:     http://download.camlcity.org/download/findlib-%version.tar.gz
 Source0:        findlib-%version.tar.xz
 #
 Requires:       ocaml-compiler-libs
@@ -35,6 +35,8 @@
 BuildRequires:  ocaml
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  ocaml-rpm-macros >= 20220222
+#
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 Findlib is a library manager for Objective Caml. It provides a

++++++ _service ++++++
--- /var/tmp/diff_new_pack.PdtSfQ/_old  2022-05-26 18:44:14.457190624 +0200
+++ /var/tmp/diff_new_pack.PdtSfQ/_new  2022-05-26 18:44:14.461190629 +0200
@@ -1,9 +1,13 @@
 <services>
+  <!-- Currently only the release tarball contains the built man pages,
+       generating them from source requires tools not available on OBS
+  -->
   <service name="tar_scm" mode="disabled">
     <param name="url">https://github.com/ocaml/ocamlfind.git</param>
     <param name="scm">git</param>
-    <param name="versionformat">1.9.2</param>
-    <param name="revision">9f29bb975a91b17e115127ec38d857673b33e0e4</param>
+    <param name="versionformat">@PARENT_TAG@</param>
+    <param name="versionrewrite-pattern">findlib-(.*)</param>
+    <param name="revision">6c8438c13b68e5cbc48ea558906046e38a7f8d72</param>
     <param name="filename">ocaml-findlib</param>
   </service>
   <service name="recompress" mode="disabled">

++++++ findlib-1.9.2.tar.xz -> findlib-1.9.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/Makefile new/findlib-1.9.3/Makefile
--- old/findlib-1.9.2/Makefile  2022-01-19 23:39:27.000000000 +0100
+++ new/findlib-1.9.3/Makefile  2022-01-24 15:15:03.000000000 +0100
@@ -102,7 +102,7 @@
 
 .PHONY: install-meta
 install-meta:
-       for x in $(SITELIB_META); do mkdir -p "$(prefix)$(OCAML_SITELIB)/$$x"; 
cp site-lib-src/$$x/META "$(prefix)$(OCAML_SITELIB)/$$x"; done
+       for x in $(SITELIB_META); do mkdir -p "$(prefix)$(OCAML_SITELIB)/$$x"; 
cp site-lib-src/$$x/META "$(prefix)$(OCAML_SITELIB)/$$x/META.tmp" && mv 
"$(prefix)$(OCAML_SITELIB)/$$x/META.tmp" "$(prefix)$(OCAML_SITELIB)/$$x/META"; 
done
        mkdir -p "$(prefix)$(OCAML_SITELIB)/findlib"; cp Makefile.packages 
"$(prefix)$(OCAML_SITELIB)/findlib/Makefile.packages"
 
 .PHONY: uninstall-meta
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/doc/README.xml 
new/findlib-1.9.3/doc/README.xml
--- old/findlib-1.9.2/doc/README.xml    2022-01-19 23:39:27.000000000 +0100
+++ new/findlib-1.9.3/doc/README.xml    2022-01-24 15:15:03.000000000 +0100
@@ -109,6 +109,8 @@
     <title>List of Changes</title>
     <ul>
 
+      <li><p><em>1.9.3:</em> Fixes another build problem regarding 
OCaml-5.00</p></li>
+
       <li><p><em>1.9.2:</em> Fixes a build problem regarding 
OCaml-5.00</p></li>
 
       <li><p><em>1.9.1:</em>  Fixes a few install-related issues, like missing 
files.</p></li>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/opam new/findlib-1.9.3/opam
--- old/findlib-1.9.2/opam      2022-01-19 23:39:27.000000000 +0100
+++ new/findlib-1.9.3/opam      2022-01-24 15:15:03.000000000 +0100
@@ -1,5 +1,7 @@
 opam-version: "2.0"
-version: "1.9.2.git"
+name: "ocamlfind"
+version: "1.9.3.git"
+license: "MIT"
 synopsis: "A library manager for OCaml"
 maintainer: "Thomas Gazagnaire <tho...@gazagnaire.org>"
 authors: "Gerd Stolpmann <g...@gerd-stolpmann.de>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/Makefile 
new/findlib-1.9.3/src/findlib/Makefile
--- old/findlib-1.9.2/src/findlib/Makefile      2022-01-19 23:39:27.000000000 
+0100
+++ new/findlib-1.9.3/src/findlib/Makefile      2022-01-24 15:15:03.000000000 
+0100
@@ -124,7 +124,14 @@
        mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
        mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
        test $(INSTALL_TOPFIND) -eq 0 || cp topfind 
"$(prefix)$(OCAML_CORE_STDLIB)"
-       files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config 
findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) 
findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi 
fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma 
findlib_top.cmxa findlib_top$(LIB_SUFFIX) findlib_top.cmxs findlib_dynload.cma 
findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) findlib_dynload.cmxs 
fl_dynload.mli fl_dynload.cmi META` && \
+       files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config \
+       findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) 
findlib.cmxs \
+       findlib_config.cmi findlib_config.ml topfind.cmi topfind.mli \
+       fl_args.cmi fl_lint.cmi fl_meta.cmi fl_split.cmi fl_topo.cmi 
ocaml_args.cmi \
+       fl_package_base.mli fl_package_base.cmi fl_metascanner.mli 
fl_metascanner.cmi \
+       fl_metatoken.cmi findlib_top.cma findlib_top.cmxa 
findlib_top$(LIB_SUFFIX) findlib_top.cmxs \
+       findlib_dynload.cma findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) 
findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi \
+       META` && \
        cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
        f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && 
f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
        cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/findlib_config.mlp 
new/findlib-1.9.3/src/findlib/findlib_config.mlp
--- old/findlib-1.9.2/src/findlib/findlib_config.mlp    2022-01-19 
23:39:27.000000000 +0100
+++ new/findlib-1.9.3/src/findlib/findlib_config.mlp    2022-01-24 
15:15:03.000000000 +0100
@@ -18,9 +18,8 @@
 
 let dll_suffix =
   match Sys.os_type with
-      "Unix" -> ".so"
-    | "Win32" -> ".dll"
-    | "Cygwin" -> ".dll"
-    | "MacOS" -> ""        (* don't know *)
+    | "Unix"  | "BeOS"   -> ".so"
+    | "Win32" | "Cygwin" -> ".dll"
+    | "MacOS"            -> ""        (* don't know *)
     | _ -> failwith "Unknown Sys.os_type"
 ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/fl_metascanner.ml 
new/findlib-1.9.3/src/findlib/fl_metascanner.ml
--- old/findlib-1.9.2/src/findlib/fl_metascanner.ml     2022-01-19 
23:39:27.000000000 +0100
+++ new/findlib-1.9.3/src/findlib/fl_metascanner.ml     2022-01-24 
15:15:03.000000000 +0100
@@ -19,6 +19,8 @@
   { pkg_defs : pkg_definition list; pkg_children : (string * pkg_expr) list
   }
 
+exception Error of string
+
 let string_of_preds pl =
   let print = function | `Pred n -> n | `NegPred n -> "-" ^ n
   in
@@ -26,284 +28,8 @@
     then ""
     else "(" ^ ((String.concat "," (List.map print pl)) ^ ")")
   
+
 let scan_lexing buf =
-  (* transform a Lexing.lexbuf into a token stream; 'Space' tokens are left
-   * out.
-   *)
-  let rec next line pos0 =
-    let t = Fl_meta.token buf
-    in
-      match t with
-      | Space -> next line pos0
-      | Newline -> next (line + 1) (Lexing.lexeme_end buf)
-      | Eof ->
-          let pos = (Lexing.lexeme_start buf) - pos0
-          in Stream.lsing (fun _ -> (line, pos, Eof))
-      | _ ->
-          let pos = (Lexing.lexeme_start buf) - pos0
-          in
-            Stream.lcons (fun _ -> (line, pos, t))
-              (Stream.slazy (fun _ -> next line pos0))
-  in next 1 0
-  
-let scan ch = scan_lexing (Lexing.from_channel ch)
-  
-let parse_lexing lexbuf =
-  let rec mk_set l =
-    match l with
-    | x :: l' -> if List.mem x l' then mk_set l' else x :: (mk_set l')
-    | [] -> [] in
-  let error_msg m line col =
-    m ^
-      (" at line " ^
-         ((string_of_int line) ^ (" position " ^ (string_of_int col)))) in
-  let rec parse_all need_rparen stream =
-    let (__strm : _ Stream.t) = stream
-    in
-      match Stream.peek __strm with
-      | Some ((line, col, Name "package")) ->
-          (Stream.junk __strm;
-           (match Stream.peek __strm with
-            | Some ((l, c, String n)) ->
-                (Stream.junk __strm;
-                 (match Stream.peek __strm with
-                  | Some ((l, c, LParen)) ->
-                      (Stream.junk __strm;
-                       let subpkg =
-                         (try parse_all true __strm
-                          with
-                          | Stream.Failure ->
-                              raise
-                                (Stream.Error
-                                   (error_msg
-                                      "Error in subpackage definition" line
-                                      col))) in
-                       let rest =
-                         (try parse_all need_rparen __strm
-                          with | Stream.Failure -> raise (Stream.Error ""))
-                       in
-                         {
-                           pkg_defs = rest.pkg_defs;
-                           pkg_children = (n, subpkg) :: rest.pkg_children;
-                         })
-                  | _ ->
-                      raise
-                        (Stream.Error
-                           (error_msg "'(' expected after string" l c))))
-            | _ ->
-                raise
-                  (Stream.Error
-                     (error_msg "String literal expected after 'package'"
-                        line col))))
-      | Some ((line, col, Name n)) ->
-          (Stream.junk __strm;
-           let props =
-             (try parse_properties __strm
-              with
-              | Stream.Failure ->
-                  raise
-                    (Stream.Error
-                       (error_msg "Error in 'name = value' clause" line col))) 
in
-           let rest =
-             (try parse_all need_rparen __strm
-              with | Stream.Failure -> raise (Stream.Error "")) in
-           let (args, flav, value) = props in (* TODO: Check args *)
-           let args' = List.sort compare (mk_set args) in
-           let def =
-             {
-               def_var = n;
-               def_flav = flav;
-               def_preds = args';
-               def_value = value;
-             }
-           in
-             {
-               pkg_defs = def :: rest.pkg_defs;
-               pkg_children = rest.pkg_children;
-             })
-      | Some ((line, col, Eof)) ->
-          (Stream.junk __strm;
-           if need_rparen
-           then
-             raise
-               (Stream.Error
-                  ("Unexpected end of file in line " ^
-                     ((string_of_int line) ^
-                        (" position " ^ (string_of_int col)))))
-           else ();
-           { pkg_defs = []; pkg_children = []; })
-      | Some ((line, col, RParen)) ->
-          (Stream.junk __strm;
-           if not need_rparen
-           then
-             raise
-               (Stream.Error
-                  ("Unexpected ')' in line " ^
-                     ((string_of_int line) ^
-                        (" position " ^ (string_of_int col)))))
-           else ();
-           { pkg_defs = []; pkg_children = []; })
-      | Some ((line, col, _)) ->
-          (Stream.junk __strm;
-           raise
-             (Stream.Error
-                (error_msg "Expected 'name = value' clause" line col)))
-      | _ -> raise Stream.Failure
-  and parse_properties stream =
-    let (__strm : _ Stream.t) = stream
-    in
-      match Stream.peek __strm with
-      | Some ((line, col, LParen)) ->
-          (Stream.junk __strm;
-           let arg1 =
-             (try parse_argument __strm
-              with | Stream.Failure -> raise (Stream.Error "")) in
-           let args =
-             (try parse_arguments __strm
-              with | Stream.Failure -> raise (Stream.Error "")) in
-           let flav =
-             (try parse_flavour __strm
-              with | Stream.Failure -> raise (Stream.Error ""))
-           in
-             (match Stream.peek __strm with
-              | Some ((line3, col3, String s)) ->
-                  (Stream.junk __strm; ((arg1 :: args), flav, s))
-              | _ ->
-                  raise
-                    (Stream.Error
-                       (error_msg "Expected string constant after '='" line
-                          col))))
-      | Some ((line, col, Equal)) ->
-          (Stream.junk __strm;
-           (match Stream.peek __strm with
-            | Some ((_, _, String s)) ->
-                (Stream.junk __strm; ([], `BaseDef, s))
-            | _ ->
-                raise
-                  (Stream.Error
-                     (error_msg
-                        "'=' must be followed by a string constant in line "
-                        line col))))
-      | Some ((line, col, PlusEqual)) ->
-          (Stream.junk __strm;
-           (match Stream.peek __strm with
-            | Some ((_, _, String s)) ->
-                (Stream.junk __strm; ([], `Appendix, s))
-            | _ ->
-                raise
-                  (Stream.Error
-                     (error_msg
-                        "'+=' must be followed by a string constant in line "
-                        line col))))
-      | Some ((line, col, _)) ->
-          (Stream.junk __strm;
-           raise
-             (Stream.Error
-                (error_msg "Expected a '=' or a '(arguments,...)=' clause"
-                   line col)))
-      | _ -> raise Stream.Failure
-  and parse_arguments stream =
-    let (__strm : _ Stream.t) = stream
-    in
-      match Stream.peek __strm with
-      | Some ((line, col, Comma)) ->
-          (Stream.junk __strm;
-           let arg =
-             (try parse_argument __strm
-              with | Stream.Failure -> raise (Stream.Error "")) in
-           let args =
-             (try parse_arguments __strm
-              with | Stream.Failure -> raise (Stream.Error ""))
-           in arg :: args)
-      | Some ((_, _, RParen)) -> (Stream.junk __strm; [])
-      | Some ((line, col, _)) ->
-          (Stream.junk __strm;
-           raise
-             (Stream.Error
-                (error_msg "Another predicate or a ')' expected" line col)))
-      | _ -> raise Stream.Failure
-  and parse_argument stream =
-    let (__strm : _ Stream.t) = stream
-    in
-      match Stream.peek __strm with
-      | Some ((line, col, Name n)) -> (Stream.junk __strm; `Pred n)
-      | Some ((line, col, Minus)) ->
-          (Stream.junk __strm;
-           (match Stream.peek __strm with
-            | Some ((l, c, Name n)) -> (Stream.junk __strm; `NegPred n)
-            | _ ->
-                raise
-                  (Stream.Error
-                     (error_msg "Name expected after '-'" line col))))
-      | Some ((line, col, _)) ->
-          (Stream.junk __strm;
-           raise (Stream.Error (error_msg "Name or -Name expected" line col)))
-      | _ -> raise Stream.Failure
-  and parse_flavour stream =
-    let (__strm : _ Stream.t) = stream
-    in
-      match Stream.peek __strm with
-      | Some ((line, col, Equal)) -> (Stream.junk __strm; `BaseDef)
-      | Some ((line, col, PlusEqual)) -> (Stream.junk __strm; `Appendix)
-      | Some ((line, col, _)) ->
-          (Stream.junk __strm;
-           raise (Stream.Error (error_msg "'+' or '+=' expected" line col)))
-      | _ -> raise Stream.Failure in
-  let rec check_defs p l =
-    match l with
-    | [] -> ()
-    | def :: l' ->
-        (List.iter
-           (fun def' ->
-              if
-                (def.def_var = def'.def_var) &&
-                  ((def.def_preds = def'.def_preds) &&
-                     ((def.def_flav = `BaseDef) && (def'.def_flav = `BaseDef)))
-              then
-                (let prefix =
-                   if p = "" then "" else "In subpackage " ^ (p ^ ": ") in
-                 let args = string_of_preds def.def_preds
-                 in
-                   raise
-                     (Stream.Error
-                        (prefix ^
-                           ("Double definition of '" ^
-                              (def.def_var ^ (args ^ "'"))))))
-              else ())
-           l';
-         check_defs p l') in
-  let rec check_pkg p pkg =
-    (check_defs p pkg.pkg_defs;
-     let l = ref []
-     in
-       List.iter
-         (fun (n, subpkg) ->
-            let p' = if p = "" then n else p ^ ("." ^ n)
-            in
-              (if List.mem n !l
-               then
-                 raise
-                   (Stream.Error ("Double definition for subpackage " ^ p'))
-               else ();
-               if String.contains n '.'
-               then
-                 raise
-                   (Stream.Error
-                      ("Subpackage name must not contain '.': \"" ^
-                         (n ^ "\"")))
-               else ();
-               check_pkg p' subpkg;
-               l := n :: !l))
-         pkg.pkg_children)
-  in
-    try
-      let pkg = parse_all false (scan_lexing lexbuf)
-      in (check_pkg "" pkg; pkg)
-    with | Stream.Error "" -> raise (Stream.Error "Syntax Error")
-  
-let parse ch = parse_lexing (Lexing.from_channel ch)
-  
-let scan2_lexing buf =
   (* transform an in_channel to a token stream; 'Space' tokens are left
    * out.
    *)
@@ -327,18 +53,18 @@
         then produce !line_ref !pos0_ref Eof
         else next !line_ref !pos0_ref
   
-let scan2 ch = scan2_lexing (Lexing.from_channel ch)
+let scan ch = scan_lexing (Lexing.from_channel ch)
   
-let parse2_lexing lexbuf =
+let parse_lexing lexbuf =
   let rec mk_set l =
     match l with
     | x :: l' -> if List.mem x l' then mk_set l' else x :: (mk_set l')
     | [] -> [] in
   let error_msg msg line col =
     Printf.sprintf "%s at line %d position %d" msg line col in
-  let next_token = scan2_lexing lexbuf in
+  let next_token = scan_lexing lexbuf in
   let raise_err error_fun line col =
-    raise (Stream.Error (error_fun line col)) in
+    raise (Error (error_fun line col)) in
   let get_tok test error_fun =
     let (line, col, tok) = next_token ()
     in
@@ -346,7 +72,7 @@
       | None -> raise_err error_fun line col
       | Some result -> result in
   let get_rule rule arg error_fmt line col =
-    try rule arg with | Stream.Error _ -> raise_err error_fmt line col in
+    try rule arg with | Error _ -> raise_err error_fmt line col in
   let rec parse_all need_rparen =
     match next_token () with
     | (line, col, Name "package") ->
@@ -459,7 +185,7 @@
                  let args = string_of_preds def.def_preds
                  in
                    raise
-                     (Stream.Error
+                     (Error
                         (prefix ^
                            ("Double definition of '" ^
                               (def.def_var ^ (args ^ "'"))))))
@@ -477,12 +203,12 @@
               (if List.mem n !l
                then
                  raise
-                   (Stream.Error ("Double definition for subpackage " ^ p'))
+                   (Error ("Double definition for subpackage " ^ p'))
                else ();
                if String.contains n '.'
                then
                  raise
-                   (Stream.Error
+                   (Error
                       ("Subpackage name must not contain '.': \"" ^
                          (n ^ "\"")))
                else ();
@@ -491,9 +217,9 @@
          pkg.pkg_children)
   in
     try let pkg = parse_all false in (check_pkg "" pkg; pkg)
-    with | Stream.Error "" -> raise (Stream.Error "Syntax Error")
+    with | Error "" -> raise (Error "Syntax Error")
   
-let parse2 ch = parse2_lexing (Lexing.from_channel ch)
+let parse ch = parse_lexing (Lexing.from_channel ch)
 
 let escape s = (* no Str available :-( *)
   let b = Buffer.create (String.length s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/fl_metascanner.mli 
new/findlib-1.9.3/src/findlib/fl_metascanner.mli
--- old/findlib-1.9.2/src/findlib/fl_metascanner.mli    2022-01-19 
23:39:27.000000000 +0100
+++ new/findlib-1.9.3/src/findlib/fl_metascanner.mli    2022-01-24 
15:15:03.000000000 +0100
@@ -44,6 +44,8 @@
    *  the definitions of the subpackages.
    *)
 
+exception Error of string
+
 
 val parse : in_channel -> pkg_expr
   (** [parse ch:] 
@@ -51,13 +53,10 @@
    * have a syntax compatible with the META format. The return value
    * contains the found definitions for the package and all subpackages.
    *
-   * [exception Stream.Error of string:] is
+   * [exception Error of string:] is
    * raised on syntax errors. The string explains the error.
    *)
 
-val parse2 : in_channel -> pkg_expr
-
-val parse2_lexing : Lexing.lexbuf -> pkg_expr
 val parse_lexing : Lexing.lexbuf -> pkg_expr
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/fl_metascanner.src 
new/findlib-1.9.3/src/findlib/fl_metascanner.src
--- old/findlib-1.9.2/src/findlib/fl_metascanner.src    2022-01-19 
23:39:27.000000000 +0100
+++ new/findlib-1.9.3/src/findlib/fl_metascanner.src    1970-01-01 
01:00:00.000000000 +0100
@@ -1,526 +0,0 @@
-(* $Id$ -*- tuareg -*-
- * ----------------------------------------------------------------------
- *
- *)
-
-open Fl_metatoken;;
-open Printf
-
-type formal_pred =
-    [ `Pred of string
-    | `NegPred of string
-    ]
-
-type flavour =
-    [ `BaseDef 
-    | `Appendix 
-    ]
-
-type pkg_definition =
-    { def_var : string;
-      def_flav : flavour;
-      def_preds : formal_pred list;
-      def_value : string;
-    }
-
-type pkg_expr =
-    { pkg_defs : pkg_definition list;
-      pkg_children : (string * pkg_expr) list;
-    }
-
-
-let string_of_preds pl =
-  let print = 
-    function 
-       `Pred n -> n
-      | `NegPred n -> "-" ^ n
-  in
-  if pl = [] then
-    ""
-  else
-    "(" ^ String.concat "," (List.map print pl) ^ ")"
-;;
-
-let scan_lexing buf =
-  (* transform a Lexing.lexbuf into a token stream; 'Space' tokens are left
-   * out.
-   *)
-  let rec next line pos0 =
-    let t = Fl_meta.token buf in
-    match t with
-      Space   -> next line pos0
-    | Newline -> next (line+1) (Lexing.lexeme_end buf)
-    | Eof     -> let pos = Lexing.lexeme_start buf - pos0 in
-                 [< '(line, pos, Eof) >]
-    | _       -> let pos = Lexing.lexeme_start buf - pos0 in
-                 [< '(line, pos, t); next line pos0 >]
-  in
-  next 1 0
-;;
-
-let scan ch = scan_lexing (Lexing.from_channel ch)
-;;    
-
-let parse_lexing lexbuf =
-
-  let rec mk_set l =
-    match l with
-      x :: l' ->
-       if List.mem x l' then mk_set l' else x :: (mk_set l')
-    | [] ->
-       []
-  in
-
-  let error_msg m line col =
-    m ^ " at line " ^ string_of_int line ^ " position " ^ string_of_int col
-  in
-
-  let rec parse_all need_rparen stream =
-    match stream with parser
-      [< '(line, col, Name "package");
-        '(l, c, String n) ?? (error_msg "String literal expected after 
'package'" line col);
-        '(l, c, LParen)   ?? (error_msg "'(' expected after string" l c);
-        subpkg = parse_all true
-         ?? (error_msg "Error in subpackage definition" line col);
-        rest = parse_all need_rparen;
-      >]
-       -> { pkg_defs = rest.pkg_defs;
-            pkg_children = (n, subpkg) :: rest.pkg_children
-          }
-
-    | [< '(line, col, Name n);
-         props = parse_properties
-         ?? (error_msg "Error in 'name = value' clause" line col);
-        rest = parse_all need_rparen
-       >]
-       -> 
-         let (args, flav, value) = props in
-         (* TODO: Check args *)
-         let args' = List.sort ( <= ) (mk_set args) in
-         let def = { def_var = n;
-                     def_flav = flav;
-                     def_preds = args';
-                     def_value = value } in
-         { pkg_defs = def :: rest.pkg_defs;
-           pkg_children = rest.pkg_children;
-         }
-
-    | [< '(line,col,Eof) >]
-       -> 
-         if need_rparen then
-           raise(Stream.Error("Unexpected end of file in line " ^
-                              string_of_int line ^ " position " ^
-                              string_of_int col));
-         { pkg_defs = [];
-           pkg_children = []
-         }
-
-    | [< '(line,col,RParen) >]
-       -> 
-         if not need_rparen then
-           raise(Stream.Error("Unexpected ')' in line " ^
-                              string_of_int line ^ " position " ^
-                              string_of_int col));
-         { pkg_defs = [];
-           pkg_children = []
-         }
-
-    | [< '(line,col,_) >]
-       -> raise(Stream.Error(error_msg "Expected 'name = value' clause" line 
col))
-
-  and parse_properties stream =
-    match stream with parser
-      [< '(line,col,LParen);
-        arg1 = parse_argument;
-        args = parse_arguments;
-        flav = parse_flavour;
-         '(line3,col3,String s)
-         ?? (error_msg "Expected string constant after '='" line col)
-      >]
-       -> arg1::args, flav, s
-
-    | [< '(line,col,Equal); '(_,_,String s)
-        ?? (error_msg "'=' must be followed by a string constant in line "
-              line col)
-      >]
-       -> [], `BaseDef, s
-
-    | [< '(line,col,PlusEqual); '(_,_,String s)
-        ?? (error_msg "'+=' must be followed by a string constant in line "
-              line col)
-      >]
-       -> [], `Appendix, s
-
-    | [< '(line,col,_) >]
-       -> raise(Stream.Error(error_msg 
-                               "Expected a '=' or a '(arguments,...)=' clause"
-                               line col))
-
-  and parse_arguments stream =
-    match stream with parser
-      [< '(line,col,Comma);
-        arg = parse_argument;
-        args = parse_arguments
-      >]
-       -> arg :: args
-    | [< '(_,_,RParen) >]
-       -> []
-    | [< '(line,col,_) >]
-       -> raise(Stream.Error(error_msg 
-                               "Another predicate or a ')' expected"
-                               line col))
-
-  and parse_argument stream =
-    match stream with parser
-       [< '(line,col,Name n) >] -> `Pred n
-      | [< '(line,col,Minus);
-          '(l,c,Name n) ?? (error_msg "Name expected after '-'" line col) >]
-                        -> `NegPred n
-      | [< '(line,col,_) >] ->
-         raise(Stream.Error(error_msg "Name or -Name expected" line col))
-            
-
-  and parse_flavour stream =
-    match stream with parser
-       [< '(line,col,Equal) >]     -> `BaseDef
-      | [< '(line,col,PlusEqual) >] -> `Appendix
-      | [< '(line,col,_) >] ->
-         raise(Stream.Error(error_msg "'+' or '+=' expected" line col))
-  in
-
-  let rec check_defs p l =
-    match l with
-      [] -> ()
-    | def :: l' ->
-       List.iter
-         (fun def' ->
-           if def.def_var = def'.def_var && 
-              def.def_preds = def'.def_preds &&
-              def.def_flav = `BaseDef &&
-              def'.def_flav = `BaseDef
-           then
-             let prefix = 
-               if p = "" then "" else "In subpackage " ^ p ^ ": " in
-             let args =
-               string_of_preds def.def_preds in
-             raise(Stream.Error (prefix ^ "Double definition of '" ^ 
-                                 def.def_var ^ args ^ "'"))
-         )
-         l';
-       check_defs p l'
-  in
-
-  let rec check_pkg p pkg =
-    check_defs p pkg.pkg_defs;
-    let l = ref [] in
-    List.iter
-      (fun (n, subpkg) -> 
-        let p' = if p = "" then n else p ^ "." ^ n in
-        if List.mem n !l then
-          raise(Stream.Error("Double definition for subpackage " ^ p'));
-        if String.contains n '.' then
-          raise(Stream.Error("Subpackage name must not contain '.': \"" ^ n ^ 
"\""));
-        check_pkg p' subpkg;
-        l := n :: !l
-      )
-      pkg.pkg_children;
-  in
-
-  try
-    let pkg = parse_all false (scan_lexing lexbuf) in
-    check_pkg "" pkg;
-    pkg
-  with
-      Stream.Error "" ->
-       raise(Stream.Error "Syntax Error")
-;;
-let parse ch = parse_lexing (Lexing.from_channel ch)
-
-let scan2_lexing buf =
-  (* transform an in_channel to a token stream; 'Space' tokens are left
-   * out.
-   *)
-  let line_ref, pos0_ref, eof_found = ref 1, ref 0, ref false in
-  fun () ->
-    let rec next line pos0 =
-      let t = Fl_meta.token buf in
-      match t with
-        | Space -> next line pos0
-        | Newline -> next (line + 1) (Lexing.lexeme_end buf)
-        | Eof -> eof_found := true; produce line pos0 Eof
-        | _ -> produce line pos0 t
-    and produce line pos0 t =
-      line_ref := line;
-      pos0_ref := pos0;
-      let pos = Lexing.lexeme_start buf - pos0 in
-      (line, pos, t)
-    in
-    if !eof_found
-    then produce !line_ref !pos0_ref Eof
-    else next !line_ref !pos0_ref
-;;
-let scan2 ch = scan2_lexing (Lexing.from_channel ch)
-;;    
-
-let parse2_lexing lexbuf =
-
-  let rec mk_set l =
-    match l with
-      x :: l' ->
-       if List.mem x l' then mk_set l' else x :: (mk_set l')
-    | [] ->
-       []
-  in
-
-  let error_msg msg line col =
-    Printf.sprintf "%s at line %d position %d" msg line col
-  in
-
-  let next_token = scan2_lexing lexbuf in
-
-  let raise_err error_fun line col =
-    raise (Stream.Error (error_fun line col))
-  in
-
-  let get_tok test error_fun =
-    let (line, col, tok) = next_token () in
-    match test tok with
-      | None -> raise_err error_fun line col
-      | Some result -> result
-  in
-  let get_rule rule arg error_fmt line col =
-    try rule arg
-    with Stream.Error _ -> raise_err error_fmt line col
-  in
-
-  let rec parse_all need_rparen =
-    match next_token () with
-      | (line, col, Name "package") ->
-        let n = get_tok string_tok (error_msg "String literal expected after 
'package'") in
-        let () = get_tok (const_tok LParen) (error_msg "'(' expected after 
string") in
-        let subpkg = get_rule parse_all true (error_msg "Error in subpackage 
definition") line col in
-        let rest = parse_all need_rparen in
-        { pkg_defs = rest.pkg_defs;
-          pkg_children = (n, subpkg) :: rest.pkg_children;
-        }
-
-      | (line, col, Name n) ->
-        let (args, flav, value) = get_rule parse_properties () (error_msg 
"Error in 'name = value' clause") line col in
-        let rest = parse_all need_rparen in
-       (* TODO: Check args *)
-       let args' = List.sort ( <= ) (mk_set args) in
-       let def = { def_var = n;
-                   def_flav = flav;
-                   def_preds = args';
-                   def_value = value } in
-       { pkg_defs = def :: rest.pkg_defs;
-         pkg_children = rest.pkg_children;
-       }
-
-    | (line, col, Eof) ->
-      if need_rparen then
-        raise_err (Printf.sprintf "Unexpected end of file in line %d position 
%d") line col;
-      { pkg_defs = [];
-       pkg_children = []
-      }
-
-    | (line, col, RParen) ->
-      if not need_rparen then
-        raise_err (Printf.sprintf "Unexpected end of file in line %d position 
%d") line col;
-      { pkg_defs = [];
-       pkg_children = []
-      }
-
-    | (line, col, _) ->
-      raise_err (error_msg "Expected 'name = value' clause") line col
-
-  and parse_properties () =
-    match next_token () with
-      | (line, col, LParen) ->
-        let arg1 = parse_argument () in
-        let args = parse_arguments () in
-        let flav = parse_flavour () in
-        let s = get_tok string_tok (error_msg "Expected string constant after 
'='") in
-        arg1::args, flav, s
-
-      | (line, col, Equal) ->
-        let s = get_tok string_tok (error_msg "'=' must be followed by a 
string constant") in
-        [], `BaseDef, s
-
-      | (line, col, PlusEqual) ->
-        let s = get_tok string_tok (error_msg "'+=' must be followed by a 
string constant") in
-        [], `Appendix, s
-
-      | (line, col, _) ->
-        raise_err (error_msg "Expected a '=' or a '(arguments,...)=' clause") 
line col
-
-  and parse_arguments () =
-    match next_token () with
-      | (line, col, Comma) ->
-        let arg = parse_argument () in
-        let args = parse_arguments () in
-        arg :: args
-      | (_, _, RParen) -> []
-      | (line, col, _) ->
-        raise_err (error_msg "Another predicate or a ')' expected") line col
-
-  and parse_argument () =
-    match next_token () with
-      | (line, col, Name n) -> `Pred n
-      | (line, col, Minus) ->
-        let n = get_tok name_tok (error_msg "Name expected after '-'") in
-        `NegPred n
-      | (line, col, _) ->
-        raise_err (error_msg "Name or -Name expected") line col
-
-  and parse_flavour () =
-    match next_token () with
-      | (line, col, Equal) -> `BaseDef
-      | (line, col, PlusEqual) -> `Appendix
-      | (line, col, _ ) -> raise_err (error_msg "'+' or '+=' expected") line 
col
-  in
-
-  let rec check_defs p l =
-    match l with
-      [] -> ()
-    | def :: l' ->
-       List.iter
-         (fun def' ->
-           if def.def_var = def'.def_var && 
-              def.def_preds = def'.def_preds &&
-              def.def_flav = `BaseDef &&
-              def'.def_flav = `BaseDef
-           then
-             let prefix = 
-               if p = "" then "" else "In subpackage " ^ p ^ ": " in
-             let args =
-               string_of_preds def.def_preds in
-             raise(Stream.Error (prefix ^ "Double definition of '" ^ 
-                                 def.def_var ^ args ^ "'"))
-         )
-         l';
-       check_defs p l'
-  in
-
-  let rec check_pkg p pkg =
-    check_defs p pkg.pkg_defs;
-    let l = ref [] in
-    List.iter
-      (fun (n, subpkg) -> 
-        let p' = if p = "" then n else p ^ "." ^ n in
-        if List.mem n !l then
-          raise(Stream.Error("Double definition for subpackage " ^ p'));
-        if String.contains n '.' then
-          raise(Stream.Error("Subpackage name must not contain '.': \"" ^ n ^ 
"\""));
-        check_pkg p' subpkg;
-        l := n :: !l
-      )
-      pkg.pkg_children;
-  in
-
-  try
-    let pkg = parse_all false in
-    check_pkg "" pkg;
-    pkg
-  with
-      Stream.Error "" ->
-       raise(Stream.Error "Syntax Error")
-;;
-let parse2 ch = parse2_lexing (Lexing.from_channel ch)
-
-let rec print f pkg =
-  let escape s = (* no Str available :-( *)
-    let b = Buffer.create (String.length s) in
-    for k = 0 to String.length s - 1 do
-      match s.[k] with
-       | '\\' -> Buffer.add_string b "\\\\"
-       | '"'  -> Buffer.add_string b "\\\""
-       | c    -> Buffer.add_char b c
-    done;
-    Buffer.contents b in
-  let format_pred =
-    function
-      | `Pred s -> s
-      | `NegPred s -> "-" ^ s in
-  let print_def def =
-    fprintf f "%s%s %s \"%s\"\n"
-      def.def_var
-      (match def.def_preds with
-        | [] -> ""
-        | l -> "(" ^ String.concat "," (List.map format_pred l) ^ ")"
-      )
-      (match def.def_flav with
-        | `BaseDef -> "="
-        | `Appendix -> "+="
-      )
-      (escape def.def_value) in
-  List.iter print_def pkg.pkg_defs;
-  List.iter
-    (fun (name,child) ->
-       fprintf f "\npackage \"%s\" (\n" (escape name);
-       print f child;
-       fprintf f ")\n"
-    )
-    pkg.pkg_children
-;;
-
-
-let lookup name predicate_list def =
-  let fulfills actual_preds formal_preds =
-    List.for_all
-      (function
-          `Pred n    -> List.mem n predicate_list
-        | `NegPred n -> not(List.mem n predicate_list)
-      )
-      formal_preds
-  in
-
-  let rec search_base best_n best_value l =
-    match l with
-      [] ->
-       if best_n >= 0 then
-         best_value
-       else
-         raise Not_found
-    | def :: l' ->
-       if name = def.def_var &&
-          def.def_flav = `BaseDef &&
-          fulfills predicate_list def.def_preds &&
-          (List.length def.def_preds > best_n) 
-       then
-         search_base (List.length def.def_preds) def.def_value l'
-       else
-         search_base best_n best_value l'
-  in
-
-  let rec search_appdx l =
-    match l with
-       [] -> []
-      | def :: l' ->
-         if name = def.def_var && 
-            def.def_flav = `Appendix &&
-            fulfills predicate_list def.def_preds
-         then
-           def.def_value :: search_appdx l'
-         else
-           search_appdx l'
-  in
-
-  let step_a = search_base (-1) "" def in
-  let step_b = search_appdx def in
-
-  String.concat " " (step_a :: step_b)
-;;
-
-
-let predicate_exists p defs =
-  List.exists
-    (fun def ->
-       List.exists
-         (function
-             `Pred n    -> n=p
-            | `NegPred n -> n=p
-         )
-         def.def_preds
-    )
-    defs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/fl_package_base.ml 
new/findlib-1.9.3/src/findlib/fl_package_base.ml
--- old/findlib-1.9.2/src/findlib/fl_package_base.ml    2022-01-19 
23:39:27.000000000 +0100
+++ new/findlib-1.9.3/src/findlib/fl_package_base.ml    2022-01-24 
15:15:03.000000000 +0100
@@ -154,7 +154,7 @@
       Failure s ->
        close_in ch;
        failwith ("While parsing '" ^ meta_file ^ "': " ^ s)
-    | Stream.Error s ->
+    | Fl_metascanner.Error s ->
        close_in ch;
        failwith ("While parsing '" ^ meta_file ^ "': " ^ s)
     | any ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/fl_split.ml 
new/findlib-1.9.3/src/findlib/fl_split.ml
--- old/findlib-1.9.2/src/findlib/fl_split.ml   2022-01-19 23:39:27.000000000 
+0100
+++ new/findlib-1.9.3/src/findlib/fl_split.ml   2022-01-24 15:15:03.000000000 
+0100
@@ -71,7 +71,7 @@
 
 let path_separator =
   match Sys.os_type with
-      "Unix"   -> ':'
+    | "Unix" | "BeOS"   -> ':'
     | "Cygwin" -> ';'   (* You might want to change this *)
     | "Win32"  -> ';'
     | "MacOS"  -> failwith "Findlib: I do not know what is the correct path 
separator for MacOS. If you can help me, write a mail to g...@gerd-stolpmann.de"
@@ -140,7 +140,7 @@
     done
   in
   match Sys.os_type with
-      "Unix" | "Cygwin" -> norm_dir_unix(); Buffer.contents b
+      "Unix" | "BeOS" | "Cygwin" -> norm_dir_unix(); Buffer.contents b
     | "Win32" -> norm_dir_win(); Buffer.contents b
     | _ -> failwith "This os_type is not supported"
 ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/frontend.ml 
new/findlib-1.9.3/src/findlib/frontend.ml
--- old/findlib-1.9.2/src/findlib/frontend.ml   2022-01-19 23:39:27.000000000 
+0100
+++ new/findlib-1.9.3/src/findlib/frontend.ml   2022-01-24 15:15:03.000000000 
+0100
@@ -1567,7 +1567,7 @@
 (* From ocamldep source code: *)
 let depends_on_char, continuation_char =
   match Sys.os_type with
-  | "Unix" | "Win32" | "Cygwin" -> ':', '\\'
+  | "Unix" | "BeOS" | "Win32" | "Cygwin" -> ':', '\\'
   | "MacOS" -> '\196', '\182'
   | _ -> assert false
 ;;
@@ -2015,7 +2015,7 @@
     pkg
   with
   | Failure s
-  | Stream.Error s ->
+  | Fl_metascanner.Error s ->
     close_in f;
     failwith ("Cannot parse '" ^ meta_name ^ "': " ^ s)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/findlib-1.9.2/src/findlib/topfind.ml.in 
new/findlib-1.9.3/src/findlib/topfind.ml.in
--- old/findlib-1.9.2/src/findlib/topfind.ml.in 2022-01-19 23:39:27.000000000 
+0100
+++ new/findlib-1.9.3/src/findlib/topfind.ml.in 2022-01-24 15:15:03.000000000 
+0100
@@ -166,6 +166,10 @@
   (* Get the sorted list of ancestors *)
   let eff_pkglist =
     Findlib.package_deep_ancestors !predicates pkglist in
+  List.iter (fun pkg ->
+    try let error = Findlib.package_property !predicates pkg "error" in
+      failwith ("Error from package `" ^ pkg ^ "': " ^ error)
+    with Not_found -> ()) eff_pkglist ;
   (* Load the packages in turn: *)
   load eff_pkglist
 ;;

Reply via email to