Stéphane Glondu pushed to branch master at Debian OCaml Maintainers / dh-ocaml
Commits: 6dfada4d by Stephane Glondu at 2026-07-23T09:41:26+02:00 dh_ocamllibinstall: copy files without using dh_install Using dh_install causes interferences with *.install files. - - - - - 2cf1e0d0 by Stephane Glondu at 2026-07-23T09:41:26+02:00 Regenerate helper.exe - - - - - 5282f42f by Stephane Glondu at 2026-07-23T09:43:07+02:00 Update changelog and prepare upload to unstable - - - - - 5 changed files: - debian/changelog - helper.exe - helper/dh_ocamllibinstall.ml - helper/support/support.ml - helper/support/support.mli Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,9 @@ +dh-ocaml (3.7) unstable; urgency=medium + + * dh_ocamllibinstall: copy files without using dh_install + + -- Stéphane Glondu <[email protected]> Thu, 23 Jul 2026 09:42:53 +0200 + dh-ocaml (3.6) unstable; urgency=medium * Avoid unsafe construct in Makefile (thanks to Uoti Urpala) ===================================== helper.exe ===================================== The diff for this file was not included because it is too large. ===================================== helper/dh_ocamllibinstall.ml ===================================== @@ -177,19 +177,19 @@ end) : sig end = struct let () = SMap.iter (fun pkg files -> + printf "I: installing files for %s...\n" pkg; let aux_file = - Printf.sprintf "debian/%s.ocamllibinstall.debhelper" pkg + Printf.sprintf + "debian/.debhelper/generated/%s/installed-by-dh_ocamllibinstall" pkg in - let () = files |> merge_lines |> saveFile aux_file in - let inner_cmd = [ "dh_install"; "-p" ^ pkg; "--autodest" ] in - let cmd = "xargs" :: "-a" :: aux_file :: inner_cmd in - printf "I: running %S with %s...\n" - (String.concat " " inner_cmd) - aux_file; - let r = exec cmd in - if r <> 0 then ( - printf "E: dh_install exited with code %d\n" r; - exit 12)) + if exec [ "mkdir"; "-p"; Filename.dirname aux_file ] = 0 then + files + |> List.map (fun file -> + let src = Printf.sprintf "debian/tmp%s" file in + install src (Printf.sprintf "debian/%s%s" pkg file); + src) + |> merge_lines |> saveFile aux_file + else failwith "aux_file") map end ===================================== helper/support/support.ml ===================================== @@ -71,3 +71,8 @@ let printf fmt = let exec args = Qjs.global##.os##exec (args |> Array.of_list |> Array.map Js.string |> Js.array) + +let install src dst = + if exec [ "mkdir"; "-p"; Filename.dirname dst ] = 0 then + if exec [ "cp"; src; dst ] = 0 then () else failwith "install/cp" + else failwith "install/mkdir" ===================================== helper/support/support.mli ===================================== @@ -7,3 +7,4 @@ val saveFile : string -> string -> unit val pread : string -> string option val printf : ('a, unit, string, unit) format4 -> 'a val exec : string list -> int +val install : string -> string -> unit View it on GitLab: https://salsa.debian.org/ocaml-team/dh-ocaml/-/compare/24bb0202431b4e16f5ba87181377b0a193f0b367...5282f42f2b3c96974071f2c5551a0d3aa7aa75fb -- View it on GitLab: https://salsa.debian.org/ocaml-team/dh-ocaml/-/compare/24bb0202431b4e16f5ba87181377b0a193f0b367...5282f42f2b3c96974071f2c5551a0d3aa7aa75fb You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help

