[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#877496: explib310 FTBFS



control: tags -1 patch pending

I went ahead and uploaded the patch for this.
Feel free to package the new release on top of this upload!
(at least we can now unblock reverse-deps)

G.
diff -Nru sexplib310-113.33.03/debian/changelog sexplib310-113.33.03/debian/changelog
--- sexplib310-113.33.03/debian/changelog	2016-08-19 09:11:38.000000000 +0200
+++ sexplib310-113.33.03/debian/changelog	2019-08-05 18:06:14.000000000 +0200
@@ -1,3 +1,11 @@
+sexplib310 (113.33.03-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Cherry-pick upstream fix for new ocaml (From Ubuntu)
+    Closes: #877496
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 05 Aug 2019 18:06:14 +0200
+
 sexplib310 (113.33.03-3) unstable; urgency=medium
 
   * Team upload
diff -Nru sexplib310-113.33.03/debian/patches/1c3df4807e71f39d064941d5fc527fe3c2e2bda7.patch sexplib310-113.33.03/debian/patches/1c3df4807e71f39d064941d5fc527fe3c2e2bda7.patch
--- sexplib310-113.33.03/debian/patches/1c3df4807e71f39d064941d5fc527fe3c2e2bda7.patch	1970-01-01 01:00:00.000000000 +0100
+++ sexplib310-113.33.03/debian/patches/1c3df4807e71f39d064941d5fc527fe3c2e2bda7.patch	2019-08-05 18:06:14.000000000 +0200
@@ -0,0 +1,80 @@
+From 1c3df4807e71f39d064941d5fc527fe3c2e2bda7 Mon Sep 17 00:00:00 2001
+From: Thomas Refis <thomas.refis@gmail.com>
+Date: Tue, 22 Mar 2016 14:13:51 +0000
+Subject: [PATCH] 113.33.00+4.03
+
+---
+ CHANGES.md  |  4 ++++
+ _oasis      |  4 ++--
+ opam        |  2 +-
+ src/conv.ml | 13 +++++++++----
+ 4 files changed, 16 insertions(+), 7 deletions(-)
+
+--- a/CHANGES.md
++++ b/CHANGES.md
+@@ -1,3 +1,7 @@
++## 113.33.00+4.03
++
++Various updates to work with OCaml 4.03.0
++
+ ## 113.33.00
+ 
+ - Changes `Sexp.to_string` to escape all non-ASCII characters.
+--- a/_oasis
++++ b/_oasis
+@@ -1,5 +1,5 @@
+ OASISFormat:           0.4
+-OCamlVersion:          >= 4.02.3
++OCamlVersion:          >= 4.03.0
+ FindlibVersion:        >= 1.3.2
+ Name:                  sexplib
+ Version:               113.33.03
+--- a/opam
++++ b/opam
+@@ -15,4 +15,4 @@
+   "ocamlfind"      {build & >= "1.3.2"}
+   "js-build-tools" {build}
+ ]
+-available: [ ocaml-version = "4.02.3" ]
++available: [ ocaml-version = "4.03.0" ]
+--- a/src/conv.ml
++++ b/src/conv.ml
+@@ -185,7 +185,7 @@
+ 
+   (* [Obj.extension_id] works on both the exception itself, and the extension slot of the
+      exception. *)
+-  let rec clean_up_handler (slot : Obj.t) =
++  let rec clean_up_handler (slot : extension_constructor) =
+     let id = Obj.extension_id slot in
+     let old_exn_id_map = !exn_id_map in
+     let new_exn_id_map = Exn_ids.remove id old_exn_id_map in
+@@ -196,7 +196,7 @@
+       exn_id_map := new_exn_id_map
+ 
+   let add_auto ?(finalise = true) exn sexp_of_exn =
+-    let id = Obj.extension_id exn in
++    let id = Obj.extension_id (Obj.extension_constructor exn) in
+     let rec loop () =
+       let old_exn_id_map = !exn_id_map in
+       let new_exn_id_map = Exn_ids.add id sexp_of_exn old_exn_id_map in
+@@ -205,13 +205,18 @@
+         loop ()
+       else begin
+         exn_id_map := new_exn_id_map;
+-        if finalise then Gc.finalise clean_up_handler (Obj.extension_slot exn)
++        if finalise then
++          try
++            Gc.finalise clean_up_handler (Obj.extension_constructor exn)
++          with Invalid_argument _ ->
++            (* Pre-allocated extension constructors cannot be finalised *)
++            ()
+       end
+     in
+     loop ()
+ 
+   let find_auto exn =
+-    let id = Obj.extension_id exn in
++    let id = Obj.extension_id (Obj.extension_constructor exn) in
+     match Exn_ids.find id !exn_id_map with
+     | exception Not_found -> None
+     | sexp_of_exn -> Some (sexp_of_exn exn)
diff -Nru sexplib310-113.33.03/debian/patches/series sexplib310-113.33.03/debian/patches/series
--- sexplib310-113.33.03/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ sexplib310-113.33.03/debian/patches/series	2019-08-05 18:06:14.000000000 +0200
@@ -0,0 +1 @@
+1c3df4807e71f39d064941d5fc527fe3c2e2bda7.patch

Reply to: