Skip to content

Commit ac1d2d2

Browse files
authored
Fix opam build due to backtrace library merge (xapi-project#6977)
Fixes a build failure caused by xapi-project#6957. The build worked with `dune` and with `koji`, but not when using `opam` to install all packages.
2 parents d3134fc + 6ab2082 commit ac1d2d2

File tree

33 files changed

+50
-43
lines changed

33 files changed

+50
-43
lines changed

dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
fmt
236236
logs
237237
mtime
238+
rpclib
238239
(xapi-stdext-pervasives (= :version))))
239240

240241
(package

ocaml/database/dune

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
httpsvr
5454
unix
5555
uuid
56-
backtrace
5756
xapi-datamodel
5857
xapi-log
5958
(re_export xapi-schema)

ocaml/database/parse_db_conf.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ let parse_db_conf s =
173173
sanity_check !connections ;
174174
!connections
175175
with exn ->
176+
let bt = Printexc.get_raw_backtrace () in
176177
error "Database config parse failed: %s" (Printexc.to_string exn) ;
177-
Backtrace.reraise exn Cannot_parse_database_config_file
178+
Printexc.raise_with_backtrace Cannot_parse_database_config_file bt
178179

179180
let get_db_conf path =
180181
if Sys.file_exists path then

ocaml/forkexecd/lib/dune

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
rpclib.xml
1313
unix
1414
uuid
15-
backtrace
1615
xapi-log
1716
xapi-stdext-pervasives
1817
xapi-stdext-unix

ocaml/forkexecd/lib/fe_systemctl.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ let start_transient ?env ?properties ?(exec_ty = Type.Simple) ~service cmd args
158158
) ;
159159
try start_transient ?env ?properties ~exec_ty ~service cmd args
160160
with e ->
161-
Backtrace.is_important e ;
161+
let bt = Printexc.get_raw_backtrace () in
162162
(* If start failed we do not know what state the service is in:
163163
* try to stop it and clean up.
164164
* Stopping could fail as well, in which case report the original exception.
@@ -168,4 +168,4 @@ let start_transient ?env ?properties ?(exec_ty = Type.Simple) ~service cmd args
168168
()
169169
with _ -> ()
170170
) ;
171-
raise e
171+
Printexc.raise_with_backtrace e bt

ocaml/gencert/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
rresult
1919
unix
2020
x509
21-
backtrace
21+
xapi-log.backtrace
2222
xapi-consts
2323
xapi-log
2424
xapi-inventory

ocaml/idl/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
sexplib0
1414
sexpr
1515
threads
16-
backtrace
16+
xapi-log.backtrace
1717
xapi-consts
1818
xapi-schema
1919
clock

ocaml/libs/backtrace/lib/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(library
22
(name backtrace)
3-
(package xapi-log)
3+
(public_name xapi-log.backtrace)
44
(flags (:standard -w -39-32))
55
(libraries
66
rpclib.core rpclib.json threads.posix)

ocaml/libs/backtrace/test/dune

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
(library
22
(name backtrace_test_lib)
33
(modules log)
4-
(libraries backtrace)
4+
(libraries xapi-log.backtrace)
55
)
66

77
(executable
88
(name raiser)
99
(modules raiser)
10-
(libraries backtrace_test_lib backtrace)
10+
(libraries backtrace_test_lib xapi-log.backtrace)
1111
)
1212

13-
(cram (deps ./raiser.exe))
13+
(cram
14+
(package xapi-log)
15+
(deps ./raiser.exe)
16+
)

ocaml/libs/http-lib/dune

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
unix
3535
uuid
3636
uri
37-
backtrace
37+
xapi-log.backtrace
3838
xapi-consts.xapi_version
3939
xapi-idl.updates
4040
xapi-log
@@ -60,7 +60,7 @@
6060
tracing_propagator
6161
unix
6262
uri
63-
backtrace
63+
xapi-log.backtrace
6464
xapi-log
6565
xapi-stdext-pervasives
6666
xapi-stdext-threads
@@ -84,7 +84,7 @@
8484
stunnel
8585
threads.posix
8686
unix
87-
backtrace
87+
xapi-log.backtrace
8888
xapi-log
8989
xapi-stdext-pervasives
9090
xapi-stdext-unix))

0 commit comments

Comments
 (0)