Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package opam-file-format for 
openSUSE:Factory checked in at 2023-01-05 15:01:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/opam-file-format (Old)
 and      /work/SRC/openSUSE:Factory/.opam-file-format.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "opam-file-format"

Thu Jan  5 15:01:00 2023 rev:6 rq:1056084 version:2.1.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/opam-file-format/opam-file-format.changes        
2022-04-12 21:51:51.725925900 +0200
+++ 
/work/SRC/openSUSE:Factory/.opam-file-format.new.1563/opam-file-format.changes  
    2023-01-05 15:01:21.257178861 +0100
@@ -1,0 +2,6 @@
+Sun Jan  1 01:01:01 UTC 2023 - [email protected]
+
+- Update to version 2.1.5
+  see included CHANGES for details
+
+-------------------------------------------------------------------

Old:
----
  opam-file-format-2.1.4.tar.xz

New:
----
  opam-file-format-2.1.5.tar.xz

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

Other differences:
------------------
++++++ opam-file-format.spec ++++++
--- /var/tmp/diff_new_pack.ODTQsF/_old  2023-01-05 15:01:21.753181475 +0100
+++ /var/tmp/diff_new_pack.ODTQsF/_new  2023-01-05 15:01:21.757181496 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package opam-file-format
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -29,7 +29,7 @@
 
 %define     pkg opam-file-format
 Name:           %pkg%nsuffix
-Version:        2.1.4
+Version:        2.1.5
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        Parser and printer for the opam file syntax
@@ -39,7 +39,7 @@
 Source0:        %pkg-%version.tar.xz
 BuildRequires:  ocaml
 BuildRequires:  ocaml-dune
-BuildRequires:  ocaml-rpm-macros >= 20220409
+BuildRequires:  ocaml-rpm-macros >= 20230101
 
 %if "%build_flavor" == "testsuite"
 BuildRequires:  ocamlfind(alcotest)

++++++ _service ++++++
--- /var/tmp/diff_new_pack.ODTQsF/_old  2023-01-05 15:01:21.809181771 +0100
+++ /var/tmp/diff_new_pack.ODTQsF/_new  2023-01-05 15:01:21.813181792 +0100
@@ -1,6 +1,6 @@
 <services>
   <service mode="disabled" name="tar_scm">
-    <param name="revision">a734db9adc9ccedf0705b3072193c0d7bbd3256d</param>
+    <param name="revision">86082d1dfdbd226002d9aa93c581cba355da6ed6</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/ocaml/opam-file-format.git</param>

++++++ opam-file-format-2.1.4.tar.xz -> opam-file-format-2.1.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/CHANGES 
new/opam-file-format-2.1.5/CHANGES
--- old/opam-file-format-2.1.4/CHANGES  2022-04-12 15:59:09.000000000 +0200
+++ new/opam-file-format-2.1.5/CHANGES  2022-12-14 20:08:48.000000000 +0100
@@ -1,7 +1,15 @@
+2.1.5 [14 December 2022]
+------------------------
+* Fix extra lines on non empty headers [#49 @hhugo]
+* Make the tests flambda2-ready [#52 @lthls]
+* Fix build failure on OCaml 5.0 when using the non-dune build mode [#50 
@dra27]
+
 2.1.4 [12 April 2022]
+---------------------
 * Fix position in the sections parser [#46 @hhugo]
 
 2.1.3 [21 May 2021]
+-------------------
 * Fix module link order (broken by #37) [#41 @dra27]
 * opam-version: "2.1" must appear at most once and as the first non-comment
   item. If opam-version is at the start and is greater than the library 
version,
@@ -11,6 +19,7 @@
   [#43, #44, #45 @dra27]
 
 2.1.2 [07 Jan 2021]
+-------------------
 * Some hash-consing for strings [#27 @AltGr]
 * Fix named section position [#31 @rjbou]
 * Don't include build system Flags module in installation [#34 @dra27]
@@ -18,14 +27,17 @@
 * Fix compilation of OpamParserTypes [#36 @dra27]
 
 2.1.1 [17 Nov 2020]
+-------------------
 * New types with more complete positions [#24 @rjbou]
 * Deprecation of all old functions [#24 @rjbou]
 * Add tests [#28 @rjbou]
 
 2.1.0 [26 Aug 2020]
+-------------------
 * Don't add a newline at the start of strings with newlines [#18 @dra27]
 * Report starting position of strings correctly [#19 @rjbou]
 * Add dune files [#13 @avsm @jonludlam @dra27]
 
 2.0.0 [1 Aug 2018]
+------------------
 * Initial version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/opam-file-format.opam 
new/opam-file-format-2.1.5/opam-file-format.opam
--- old/opam-file-format-2.1.4/opam-file-format.opam    2022-04-12 
15:59:09.000000000 +0200
+++ new/opam-file-format-2.1.5/opam-file-format.opam    2022-12-14 
20:08:48.000000000 +0100
@@ -1,11 +1,11 @@
 opam-version: "2.0"
-version: "2.1.4"
+version: "2.1.5"
 synopsis: "Parser and printer for the opam file syntax"
 maintainer: "Louis Gesbert <[email protected]>"
 authors: "Louis Gesbert <[email protected]>"
 homepage: "https://opam.ocaml.org";
 bug-reports: "https://github.com/ocaml/opam-file-format/issues";
-license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
+license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
 dev-repo: "git+https://github.com/ocaml/opam-file-format";
 build: [
   [make "byte" {!ocaml:native} "all" {ocaml:native}] {!dune:installed}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/src/Makefile 
new/opam-file-format-2.1.5/src/Makefile
--- old/opam-file-format-2.1.4/src/Makefile     2022-04-12 15:59:09.000000000 
+0200
+++ new/opam-file-format-2.1.5/src/Makefile     2022-12-14 20:08:48.000000000 
+0100
@@ -3,12 +3,17 @@
 %.ml: %.mll
        ocamllex $<
 
-OCAML_VERSION:=$(shell ocamlc -vnum | tr -d '\r' | sed -e 's/+.*//' -e 
's/\.//g')
+EMPTY=
+SPACE=$(EMPTY) $(EMPTY)
+OCAML_VERSION:=$(firstword $(subst ~, ,$(subst +, ,$(shell ocamlc -version))))
 ifeq ($(OCAML_VERSION),)
 OCAML_VERSION:=0
+else
+OCAML_VERSION:=$(subst ., ,$(OCAML_VERSION))
+OCAML_VERSION:=$(subst $(SPACE),,$(firstword $(OCAML_VERSION))$(foreach 
i,$(wordlist 2,$(words $(OCAML_VERSION)),$(OCAML_VERSION)),$(if $(filter 0 1 2 
3 4 5 6 7 8 9,$(i)),0,)$(i)))
 endif
 
-ifeq ($(shell test $(OCAML_VERSION) -ge 4022 || echo no-attributes),)
+ifeq ($(shell test $(OCAML_VERSION) -ge 40202 || echo no-attributes),)
 PP=
 else
 PP=-pp 'sed -e s/\\[@@\\?ocaml[^]]*\\]//'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/src/opamPrinter.ml 
new/opam-file-format-2.1.5/src/opamPrinter.ml
--- old/opam-file-format-2.1.4/src/opamPrinter.ml       2022-04-12 
15:59:09.000000000 +0200
+++ new/opam-file-format-2.1.5/src/opamPrinter.ml       2022-12-14 
20:08:48.000000000 +0100
@@ -713,16 +713,13 @@
           in
           List.rev_append acc remaining
       in
+      let body = String.concat "\n" (aux [] f orig) in
       let header =
         match orig with
-        | [] -> []
-        | h::_ ->
-          let header =
-            get_substring {filename=""; start=(1,0); stop=h.pos.start}
-          in
-          if header = "" then [] else [header]
+        | [] -> ""
+        | h::_ -> get_substring {filename=""; start=(1,0); stop=h.pos.start}
       in
-      String.concat "\n" (aux header f orig)
+      header ^ body
 
     let opamfile ?format_from f =
       let orig_file = match format_from with
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/tests/fullpos.ml 
new/opam-file-format-2.1.5/tests/fullpos.ml
--- old/opam-file-format-2.1.4/tests/fullpos.ml 2022-04-12 15:59:09.000000000 
+0200
+++ new/opam-file-format-2.1.5/tests/fullpos.ml 2022-12-14 20:08:48.000000000 
+0100
@@ -448,6 +448,28 @@
           (print_ofile (parse_ofile str)))
       t
 
+  let test_printer_preserved t () =
+    let write_tmp content ~f =
+      let file, oc = Filename.open_temp_file "opam-test-" ".opam" in
+      output_string oc content;
+      close_out oc;
+      let res = f file in
+      Sys.remove file;
+      res
+    in
+    let opamfile = OpamPrinter.FullPos.Preserved.opamfile in
+    List.iter (fun (name, str, _) ->
+        let file = parse_ofile str in
+        let content1 = write_tmp str ~f:(fun tmp ->
+            opamfile ~format_from:tmp file)
+        in
+        let content2 = write_tmp content1 ~f:(fun tmp ->
+            opamfile ~format_from:tmp file)
+        in
+        A.check A.string name content1 content2
+        )
+      t
+
   let positions () =
     let filename = Sys.getcwd () ^ "/sample.opam" in
     let spos start stop = {filename; start; stop } in
@@ -501,6 +523,7 @@
       "parser", test_parser (opamfiles @ opamfiles_comment);
       "printer", test_printer opamfiles;
       "parser-printer", test_parser_printer opamfiles;
+      "printer-preserved", test_printer_preserved opamfiles_comment;
       "positions-file", positions;
     ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opam-file-format-2.1.4/tests/hygiene/dune 
new/opam-file-format-2.1.5/tests/hygiene/dune
--- old/opam-file-format-2.1.4/tests/hygiene/dune       2022-04-12 
15:59:09.000000000 +0200
+++ new/opam-file-format-2.1.5/tests/hygiene/dune       2022-12-14 
20:08:48.000000000 +0100
@@ -2,7 +2,6 @@
 
 (test
   (name opamBaseParser)
-  (libraries opam-file-format)
   (modules OpamParserTypes OpamBaseParser)
   (flags :standard (:include flags.sexp))
   (action (run %{test} %{version:opam-file-format})))

Reply via email to