Le 21/05/2026 à 13:12, Stéphane Glondu a écrit :
Nonetheless, the changes that scratch my present itch are cherry-
pickable into bookworm's version:
https://salsa.debian.org/debian/ben/-/tree/bookworm
and are already in testing (version 1.20), one can just build it with
sbuild in a bookworm chroot... but I'm afraid this doesn't qualify for
an official backport, as it's a version that never existed anywhere.
One can argue it fixes a bug, so maybe it could qualify for an oldstable
update?
FYI, I've attached a debdiff.
Cheers,
--
Stéphane
diff -Nru ben-0.10.1/debian/changelog ben-0.10.1+deb12u1/debian/changelog
--- ben-0.10.1/debian/changelog 2023-01-23 07:36:52.000000000 +0100
+++ ben-0.10.1+deb12u1/debian/changelog 2026-05-14 10:32:33.000000000 +0200
@@ -1,3 +1,11 @@
+ben (0.10.1+deb12u1) bookworm; urgency=medium
+
+ * Backport changes from sid:
+ - Evaluate build-dependencies as on buildds
+ - Fix parsing of multiarch qualifiers in dependencies
+
+ -- Stéphane Glondu <[email protected]> Thu, 14 May 2026 10:32:33 +0200
+
ben (0.10.1) unstable; urgency=medium
[ Stéphane Glondu ]
diff -Nru ben-0.10.1/.gitignore ben-0.10.1+deb12u1/.gitignore
--- ben-0.10.1/.gitignore 2023-01-23 07:36:52.000000000 +0100
+++ ben-0.10.1+deb12u1/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-_build
-ben
-*~
-modules.png
-doc/ben.1
-doc/refman.html
diff -Nru ben-0.10.1/lib/package.ml ben-0.10.1+deb12u1/lib/package.ml
--- ben-0.10.1/lib/package.ml 2023-01-23 07:36:52.000000000 +0100
+++ ben-0.10.1+deb12u1/lib/package.ml 2026-05-14 10:32:33.000000000 +0200
@@ -110,12 +110,39 @@
add key (f previous) t
end
+let eval_conjunction xs = List.for_all (String.starts_with ~prefix:"!") xs
+let eval_disjunction xs = List.exists eval_conjunction xs
+
let get_and_split =
- let rex = Re.Pcre.regexp "(?:[, |]|\\([^)]+\\))+" in
+ let open Re.Pcre in
+ let rex_split_pkg = regexp ",\\s*" in
+ let rex_split_alt = regexp "\\s*\\|\\s*" in
+ let rex_match_pkg = regexp "^([^ :]+)(?::\\S+)?(?:\\s+(.*))?$" in
+ let rex_match_profile = regexp "<([^>]+)>" in
+ let rex_split_spaces = regexp "\\s+" in
fun field x ->
try
- let deps = get field x in
- Re.Pcre.split ~rex deps
+ get field x |> split ~rex:rex_split_pkg
+ |> List.map (fun x ->
+ match split ~rex:rex_split_alt x with x :: _ -> x | _ -> x)
+ |> List.filter_map (fun x ->
+ match exec ~rex:rex_match_pkg x with
+ | exception Not_found -> None
+ | g ->
+ Some
+ (get_substring g 1, try get_substring g 2 with Not_found ->
""))
+ |> List.filter_map (fun (pkg, extra) ->
+ if
+ Re.all rex_match_profile extra
+ |> List.map (fun g ->
+ Re.Group.get g 1 |> split ~rex:rex_split_spaces)
+ |> fun xs ->
+ if xs = [] then true
+ else
+ (* we evaluate the build profile restriction formula with no
profiles *)
+ eval_disjunction xs
+ then Some pkg
+ else None)
with Not_found -> []
let build_depends x =