Package: dose-distcheck
Version: 7.0.0-6
In case the packages are not co-installable, the indentation of the 'reasons' block is wrong.
I have a minimal reproducible example and what I believe to be a fix:
$ dpkg-deb -x dose-distcheck_7.0.0-6_amd64.deb .
$ /bin/cat ./pkgs
Package: pkg1
Architecture: amd64
Version: 1
Package: pkg2
Architecture: amd64
Version: 2
Depends: pkg3
$ cat ./pkgs | usr/bin/dose-debcheck --explain --failures --coinst pkg1,pkg2
output-version: 1.2
report:
-
coinst: pkg1 (= 1) , pkg2 (= 2)
status: broken
reasons:
-
missing:
pkg:
package: pkg2
version: 2
architecture: amd64
unsat-dependency: pkg3
-
missing:
pkg:
package: pkg2
version: 2
architecture: amd64
unsat-dependency: pkg3
total-packages: 2
total-tuples: 1
broken-tuples: 1
$ cat ./pkgs | usr/bin/dose-debcheck --explain --failures --coinst pkg1,pkg2 | yq .
yq: Error running jq: ParserError: while parsing a block collection
in "<stdin>", line 3, column 2
did not find expected '-' indicator
in "<stdin>", line 7, column 2.
I believe the box should not be closed that early, hence the patch that should fix it:
Index: dose3-7.0.0-6/src/algo/
diagnostic.ml===================================================================
--- dose3-7.0.0-6.orig/src/algo/
diagnostic.ml+++ dose3-7.0.0-6/src/algo/
diagnostic.ml@@ -700,7 +700,6 @@ let fprintf ?(pp = CudfAdd.default_pp) ?
"failure: %s@,"
(String.concat " , " (List.map CudfAdd.string_of_package rl)) ;
Format.fprintf fmt "status: broken@," ;
- Format.fprintf fmt "@]@," ;
if explain then (
Format.fprintf fmt "@[<v 1>reasons:@," ;
List.iter
--