diff -pruN 0.9.2/bin/ben.mli 0.10.0/bin/ben.mli
--- 0.9.2/bin/ben.mli	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/bin/ben.mli	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1 @@
+(* empty interface *)
diff -pruN 0.9.2/debian/changelog 0.10.0/debian/changelog
--- 0.9.2/debian/changelog	2021-01-17 20:44:44.000000000 +0000
+++ 0.10.0/debian/changelog	2022-01-22 07:08:05.000000000 +0000
@@ -1,8 +1,28 @@
+ben (0.10.0) unstable; urgency=medium
+
+  [ Mehdi Dogguy ]
+  * New homepage: https://debian.pages.debian.net/ben/
+
+  [ Jochen Sprickerhof ]
+  * Replace which by command -v
+
+  [ Stéphane Glondu ]
+  * More concise output in debcheck in migrate examples
+  * Many changes in "ben rebuild"
+    - add parallelization option (-j)
+    - handle repo update inside ben, so that a shell loop is not needed
+  * Add OCaml transition preparation scripts to examples
+
+  [ Debian Janitor ]
+  * Update standards version to 4.6.0, no changes needed.
+
+ -- Stéphane Glondu <glondu@debian.org>  Sat, 22 Jan 2022 08:08:05 +0100
+
 ben (0.9.2) unstable; urgency=medium
 
-  * Set status filters via URL parameters (Closes: #876966) 
-  * Use Tyxml.Html.txt instead of Tyxml.Html.pcdata as the latter is deprecated 
-  * Avoid deleting lock file when it exists 
+  * Set status filters via URL parameters (Closes: #876966)
+  * Use Tyxml.Html.txt instead of Tyxml.Html.pcdata as the latter is deprecated
+  * Avoid deleting lock file when it exists
   * Add <label> tags to make filters easier to toggle (Closes: #956005)
 
  -- Mehdi Dogguy <mehdi@debian.org>  Sun, 17 Jan 2021 21:44:44 +0100
diff -pruN 0.9.2/debian/control 0.10.0/debian/control
--- 0.9.2/debian/control	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/debian/control	2022-01-22 07:08:05.000000000 +0000
@@ -19,17 +19,18 @@ Build-Depends:
  libparmap-ocaml-dev,
  libre-ocaml-dev (>= 1.7.2~),
  libextlib-ocaml-dev,
- ocaml-nox (>= 4.03~),
+ liblwt-ocaml-dev,
+ ocaml,
  asciidoctor,
  docbook-xml,
  docbook-xsl,
  libxml2-utils,
  xsltproc,
  source-highlight
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Rules-Requires-Root: no
 Section: devel
-Homepage: https://ben.debian.net
+Homepage: https://debian.pages.debian.net/ben/
 Vcs-Browser: https://salsa.debian.org/debian/ben
 Vcs-Git: https://salsa.debian.org/debian/ben.git
 
diff -pruN 0.9.2/debian/copyright 0.10.0/debian/copyright
--- 0.9.2/debian/copyright	2018-05-21 13:54:04.000000000 +0000
+++ 0.10.0/debian/copyright	2022-01-22 07:08:05.000000000 +0000
@@ -3,7 +3,7 @@ Packaged-By: Stéphane Glondu <steph@glo
 Packaged-Date: Tue, 20 Sep 2011 20:24:13 +0200
 
 Files: *
-Copyright: © 2009-2013 Stéphane Glondu <steph@glondu.net>
+Copyright: © 2009-2022 Stéphane Glondu <steph@glondu.net>
            © 2010-2013 Mehdi Dogguy <mehdi@dogguy.org>
            © 2013 Johannes Schauer <j.schauer@email.de>
 License: AGPL-3+
diff -pruN 0.9.2/doc/ben.1 0.10.0/doc/ben.1
--- 0.9.2/doc/ben.1	2021-01-17 20:32:17.000000000 +0000
+++ 0.10.0/doc/ben.1	1970-01-01 00:00:00.000000000 +0000
@@ -1,178 +0,0 @@
-'\" t
-.\"     Title: ben
-.\"    Author: Mehdi Dogguy and Stéphane Glondu
-.\" Generator: Asciidoctor 2.0.12
-.\"      Date: 2020-09-27
-.\"    Manual: \ \&
-.\"    Source: \ \&
-.\"  Language: English
-.\"
-.TH "BEN" "1" "2020-09-27" "\ \&" "\ \&"
-.ie \n(.g .ds Aq \(aq
-.el       .ds Aq '
-.ss \n[.ss] 0
-.nh
-.ad l
-.de URL
-\fI\\$2\fP <\\$1>\\$3
-..
-.als MTO URL
-.if \n[.g] \{\
-.  mso www.tmac
-.  am URL
-.    ad l
-.  .
-.  am MTO
-.    ad l
-.  .
-.  LINKSTYLE blue R < >
-.\}
-.SH "NAME"
-ben \- transition tracker manager
-.SH "SYNOPSIS"
-.sp
-\fBben\fP \fIFRONTEND\fP [\fIOPTIONS\fP]
-.sp
-\fBben\fP [\-h|\-help|\-\-help]
-.SH "DESCRIPTION"
-.sp
-The ben(1) command is a set of utilities written in OCaml. It provides
-a full featured transition tracker to follow the evolution of a set of
-packages in the Debian’s archive. All frontends share a common list of
-options described below.
-.SH "OPTIONS"
-.sp
-\fB\-\-dry\-run\fP
-.RS 4
-Dry run
-.RE
-.sp
-\fB\-\-quiet|\-q\fP
-.RS 4
-Quiet mode
-.RE
-.sp
-\fB\-\-verbose\fP
-.RS 4
-Verbose mode
-.RE
-.sp
-\fB\-\-mirror uri\fP
-.RS 4
-Package mirror to use
-.RE
-.sp
-\fB\-\-mirror\-binaries uri\fP
-.RS 4
-Package mirror to use for binaries
-.RE
-.sp
-\fB\-\-mirror\-sources uri\fP
-.RS 4
-Package mirror to use for sources
-.RE
-.sp
-\fB\-\-areas a,…\fP
-.RS 4
-Areas to consider (comma separated)
-.RE
-.sp
-\fB\-\-archs a,…\fP
-.RS 4
-Architectures to consider (comma separated)
-.RE
-.sp
-\fB\-\-suite a\fP
-.RS 4
-Suite
-.RE
-.sp
-\fB\-\-cache\-dir d\fP
-.RS 4
-Path to cache dir
-.RE
-.sp
-\fB\-\-cache\-file|\-C f\fP
-.RS 4
-Specify the name of the cache file
-.RE
-.sp
-\fB\-\-use\-cache\fP
-.RS 4
-Use cache whenever possible
-.RE
-.sp
-\fB\-\-config|\-c c\fP
-.RS 4
-Config file
-.RE
-.sp
-\fB\-\-more\-binary\-keys l\fP
-.RS 4
-Comma separated list of further relevant binary keys
-.RE
-.sp
-\fB\-\-more\-source\-keys l\fP
-.RS 4
-Comma separated list of further relevant source keys
-.RE
-.sp
-\fB\-\-preferred\-compression\-format f\fP
-.RS 4
-Preferred compression format (Default: Gzip)
-.RE
-.SH "FRONTENDS"
-.sp
-\fBdownload\fP
-.RS 4
-has no command\-line options, except the shared ones. It downloads
-all Sources.gz files and all Packages.gz files for selected
-architectures and areas.
-.RE
-.sp
-\fBquery\fP
-.RS 4
-This utility is pretty much like grep\-dctrl(1). Given a list of
-Packages or Sources files, it performs a query and outputs the
-result.
-.RE
-.sp
-\fBmonitor\fP
-.RS 4
-The frontend monitor builds a monitor page for a transition that
-is described by few criteria (the list of affected packages, a
-description of good package and the description of a broken
-package).
-.RE
-.sp
-\fBtracker\fP
-.RS 4
-This frontend uses the monitor to generate a summary page about
-all known transitions. An example of such summary can be found at
-.URL "https://release.debian.org/transitions/" "" "."
-.RE
-.sp
-\fBrebuild\fP
-.RS 4
-This frontend rebuilds all packages matching a criterion, respecting
-the order of build\-dependencies.
-.RE
-.sp
-\fBmigrate\fP
-.RS 4
-This frontend simulates a migration of some packages from unstable
-to testing, and outputs an easy hint for Britney.
-.RE
-.sp
-For more information about ben\(cqs frontends, please refer to the
-reference manual.
-.SH "AUTHOR"
-.sp
-Ben was originally written by Stéphane Glondu.
-.SH "RESOURCES"
-.sp
-Main web site: \c
-.URL "https://ben.debian.net/" "" ""
-.SH "AUTHOR"
-.sp
-Mehdi Dogguy and Stéphane Glondu
\ No newline at end of file
diff -pruN 0.9.2/doc/ben.1.txt 0.10.0/doc/ben.1.txt
--- 0.9.2/doc/ben.1.txt	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/doc/ben.1.txt	2022-01-22 07:08:05.000000000 +0000
@@ -117,4 +117,4 @@ Ben was originally written by Stéphane
 
 RESOURCES
 ---------
-Main web site: <https://ben.debian.net/>
+Main web site: <https://debian.pages.debian.net/ben/>
diff -pruN 0.9.2/doc/refman.html 0.10.0/doc/refman.html
--- 0.9.2/doc/refman.html	2021-01-17 20:32:17.000000000 +0000
+++ 0.10.0/doc/refman.html	1970-01-01 00:00:00.000000000 +0000
@@ -1,1278 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-<meta charset="UTF-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<meta name="generator" content="Asciidoctor 2.0.12">
-<meta name="author" content="Mehdi Dogguy and Stéphane Glondu">
-<title>Ben&#8217;s reference manual</title>
-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
-<style>
-/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
-/* Uncomment @import statement to use as custom stylesheet */
-/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
-article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}
-audio,video{display:inline-block}
-audio:not([controls]){display:none;height:0}
-html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
-a{background:none}
-a:focus{outline:thin dotted}
-a:active,a:hover{outline:0}
-h1{font-size:2em;margin:.67em 0}
-abbr[title]{border-bottom:1px dotted}
-b,strong{font-weight:bold}
-dfn{font-style:italic}
-hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
-mark{background:#ff0;color:#000}
-code,kbd,pre,samp{font-family:monospace;font-size:1em}
-pre{white-space:pre-wrap}
-q{quotes:"\201C" "\201D" "\2018" "\2019"}
-small{font-size:80%}
-sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
-sup{top:-.5em}
-sub{bottom:-.25em}
-img{border:0}
-svg:not(:root){overflow:hidden}
-figure{margin:0}
-fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
-legend{border:0;padding:0}
-button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
-button,input{line-height:normal}
-button,select{text-transform:none}
-button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
-button[disabled],html input[disabled]{cursor:default}
-input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
-button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
-textarea{overflow:auto;vertical-align:top}
-table{border-collapse:collapse;border-spacing:0}
-*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
-html,body{font-size:100%}
-body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
-a:hover{cursor:pointer}
-img,object,embed{max-width:100%;height:auto}
-object,embed{height:100%}
-img{-ms-interpolation-mode:bicubic}
-.left{float:left!important}
-.right{float:right!important}
-.text-left{text-align:left!important}
-.text-right{text-align:right!important}
-.text-center{text-align:center!important}
-.text-justify{text-align:justify!important}
-.hide{display:none}
-img,object,svg{display:inline-block;vertical-align:middle}
-textarea{height:auto;min-height:50px}
-select{width:100%}
-.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
-div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
-a{color:#2156a5;text-decoration:underline;line-height:inherit}
-a:hover,a:focus{color:#1d4b8f}
-a img{border:0}
-p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
-p aside{font-size:.875em;line-height:1.35;font-style:italic}
-h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
-h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
-h1{font-size:2.125em}
-h2{font-size:1.6875em}
-h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
-h4,h5{font-size:1.125em}
-h6{font-size:1em}
-hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
-em,i{font-style:italic;line-height:inherit}
-strong,b{font-weight:bold;line-height:inherit}
-small{font-size:60%;line-height:inherit}
-code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
-ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
-ul,ol{margin-left:1.5em}
-ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
-ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
-ul.square{list-style-type:square}
-ul.circle{list-style-type:circle}
-ul.disc{list-style-type:disc}
-ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
-dl dt{margin-bottom:.3125em;font-weight:bold}
-dl dd{margin-bottom:1.25em}
-abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
-abbr{text-transform:none}
-blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
-blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
-blockquote cite::before{content:"\2014 \0020"}
-blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
-blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
-@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
-h1{font-size:2.75em}
-h2{font-size:2.3125em}
-h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
-h4{font-size:1.4375em}}
-table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede;word-wrap:normal}
-table thead,table tfoot{background:#f7f8f7}
-table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
-table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
-table tr.even,table tr.alt{background:#f8f8f7}
-table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
-h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
-h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
-.center{margin-left:auto;margin-right:auto}
-.stretch{width:100%}
-.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
-.clearfix::after,.float-group::after{clear:both}
-:not(pre).nobreak{word-wrap:normal}
-:not(pre).nowrap{white-space:nowrap}
-:not(pre).pre-wrap{white-space:pre-wrap}
-:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
-pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
-pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
-pre>code{display:block}
-pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
-em em{font-style:normal}
-strong strong{font-weight:400}
-.keyseq{color:rgba(51,51,51,.8)}
-kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
-.keyseq kbd:first-child{margin-left:0}
-.keyseq kbd:last-child{margin-right:0}
-.menuseq,.menuref{color:#000}
-.menuseq b:not(.caret),.menuref{font-weight:inherit}
-.menuseq{word-spacing:-.02em}
-.menuseq b.caret{font-size:1.25em;line-height:.8}
-.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
-b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
-b.button::before{content:"[";padding:0 3px 0 2px}
-b.button::after{content:"]";padding:0 2px 0 3px}
-p a>code:hover{color:rgba(0,0,0,.9)}
-#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
-#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
-#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
-#content{margin-top:1.25em}
-#content::before{content:none}
-#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
-#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
-#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
-#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
-#header .details span:first-child{margin-left:-.125em}
-#header .details span.email a{color:rgba(0,0,0,.85)}
-#header .details br{display:none}
-#header .details br+span::before{content:"\00a0\2013\00a0"}
-#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
-#header .details br+span#revremark::before{content:"\00a0|\00a0"}
-#header #revnumber{text-transform:capitalize}
-#header #revnumber::after{content:"\00a0"}
-#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
-#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
-#toc>ul{margin-left:.125em}
-#toc ul.sectlevel0>li>a{font-style:italic}
-#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
-#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
-#toc li{line-height:1.3334;margin-top:.3334em}
-#toc a{text-decoration:none}
-#toc a:active{text-decoration:underline}
-#toctitle{color:#7a2518;font-size:1.2em}
-@media screen and (min-width:768px){#toctitle{font-size:1.375em}
-body.toc2{padding-left:15em;padding-right:0}
-#toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
-#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
-#toc.toc2>ul{font-size:.9em;margin-bottom:0}
-#toc.toc2 ul ul{margin-left:0;padding-left:1em}
-#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
-body.toc2.toc-right{padding-left:0;padding-right:15em}
-body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
-@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
-#toc.toc2{width:20em}
-#toc.toc2 #toctitle{font-size:1.375em}
-#toc.toc2>ul{font-size:.95em}
-#toc.toc2 ul ul{padding-left:1.25em}
-body.toc2.toc-right{padding-left:0;padding-right:20em}}
-#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
-#content #toc>:first-child{margin-top:0}
-#content #toc>:last-child{margin-bottom:0}
-#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
-#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
-#content{margin-bottom:.625em}
-.sect1{padding-bottom:.625em}
-@media screen and (min-width:768px){#content{margin-bottom:1.25em}
-.sect1{padding-bottom:1.25em}}
-.sect1:last-child{padding-bottom:0}
-.sect1+.sect1{border-top:1px solid #e7e7e9}
-#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
-#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
-#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
-#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
-#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
-details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
-details>summary:first-of-type{cursor:pointer;display:list-item;outline:none;margin-bottom:.75em}
-.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
-table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
-.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
-table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
-.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
-.admonitionblock>table td.icon{text-align:center;width:80px}
-.admonitionblock>table td.icon img{max-width:none}
-.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
-.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
-.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
-.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
-.exampleblock>.content>:first-child{margin-top:0}
-.exampleblock>.content>:last-child{margin-bottom:0}
-.sidebarblock{border-style:solid;border-width:1px;border-color:#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;-webkit-border-radius:4px;border-radius:4px}
-.sidebarblock>:first-child{margin-top:0}
-.sidebarblock>:last-child{margin-bottom:0}
-.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
-.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
-.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
-@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
-@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
-.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
-.literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
-.listingblock>.content{position:relative}
-.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
-.listingblock:hover code[data-lang]::before{display:block}
-.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
-.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
-.listingblock pre.highlightjs{padding:0}
-.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
-.listingblock pre.prettyprint{border-width:0}
-.prettyprint{background:#f7f7f8}
-pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
-pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
-pre.prettyprint li code[data-lang]::before{opacity:1}
-pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
-table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
-table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
-table.linenotable td.code{padding-left:.75em}
-table.linenotable td.linenos{border-right:1px solid currentColor;opacity:.35;padding-right:.5em}
-pre.pygments .lineno{border-right:1px solid currentColor;opacity:.35;display:inline-block;margin-right:.75em}
-pre.pygments .lineno::before{content:"";margin-right:-.125em}
-.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
-.quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
-.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
-.quoteblock blockquote{margin:0;padding:0;border:0}
-.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
-.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
-.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
-.verseblock{margin:0 1em 1.25em}
-.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
-.verseblock pre strong{font-weight:400}
-.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
-.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
-.quoteblock .attribution br,.verseblock .attribution br{display:none}
-.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
-.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
-.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
-.quoteblock.abstract{margin:0 1em 1.25em;display:block}
-.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
-.quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
-.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
-.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
-.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
-p.tableblock:last-child{margin-bottom:0}
-td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
-td.tableblock>.content>:last-child{margin-bottom:-1.25em}
-table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
-table.grid-all>*>tr>*{border-width:1px}
-table.grid-cols>*>tr>*{border-width:0 1px}
-table.grid-rows>*>tr>*{border-width:1px 0}
-table.frame-all{border-width:1px}
-table.frame-ends{border-width:1px 0}
-table.frame-sides{border-width:0 1px}
-table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
-table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
-table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
-table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
-table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
-th.halign-left,td.halign-left{text-align:left}
-th.halign-right,td.halign-right{text-align:right}
-th.halign-center,td.halign-center{text-align:center}
-th.valign-top,td.valign-top{vertical-align:top}
-th.valign-bottom,td.valign-bottom{vertical-align:bottom}
-th.valign-middle,td.valign-middle{vertical-align:middle}
-table thead th,table tfoot th{font-weight:bold}
-tbody tr th{background:#f7f8f7}
-tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
-p.tableblock>code:only-child{background:none;padding:0}
-p.tableblock{font-size:1em}
-ol{margin-left:1.75em}
-ul li ol{margin-left:1.5em}
-dl dd{margin-left:1.125em}
-dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
-ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
-ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
-ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
-ul.unstyled,ol.unstyled{margin-left:0}
-ul.checklist{margin-left:.625em}
-ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
-ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
-ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
-ul.inline>li{margin-left:1.25em}
-.unstyled dl dt{font-weight:400;font-style:normal}
-ol.arabic{list-style-type:decimal}
-ol.decimal{list-style-type:decimal-leading-zero}
-ol.loweralpha{list-style-type:lower-alpha}
-ol.upperalpha{list-style-type:upper-alpha}
-ol.lowerroman{list-style-type:lower-roman}
-ol.upperroman{list-style-type:upper-roman}
-ol.lowergreek{list-style-type:lower-greek}
-.hdlist>table,.colist>table{border:0;background:none}
-.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
-td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
-td.hdlist1{font-weight:bold;padding-bottom:1.25em}
-td.hdlist2{word-wrap:anywhere}
-.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
-.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
-.colist td:not([class]):first-child img{max-width:none}
-.colist td:not([class]):last-child{padding:.25em 0}
-.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
-.imageblock.left{margin:.25em .625em 1.25em 0}
-.imageblock.right{margin:.25em 0 1.25em .625em}
-.imageblock>.title{margin-bottom:0}
-.imageblock.thumb,.imageblock.th{border-width:6px}
-.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
-.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
-.image.left{margin-right:.625em}
-.image.right{margin-left:.625em}
-a.image{text-decoration:none;display:inline-block}
-a.image object{pointer-events:none}
-sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
-sup.footnote a,sup.footnoteref a{text-decoration:none}
-sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
-#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
-#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
-#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
-#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
-#footnotes .footnote:last-of-type{margin-bottom:0}
-#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
-.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
-.gist .file-data>table td.line-data{width:99%}
-div.unbreakable{page-break-inside:avoid}
-.big{font-size:larger}
-.small{font-size:smaller}
-.underline{text-decoration:underline}
-.overline{text-decoration:overline}
-.line-through{text-decoration:line-through}
-.aqua{color:#00bfbf}
-.aqua-background{background:#00fafa}
-.black{color:#000}
-.black-background{background:#000}
-.blue{color:#0000bf}
-.blue-background{background:#0000fa}
-.fuchsia{color:#bf00bf}
-.fuchsia-background{background:#fa00fa}
-.gray{color:#606060}
-.gray-background{background:#7d7d7d}
-.green{color:#006000}
-.green-background{background:#007d00}
-.lime{color:#00bf00}
-.lime-background{background:#00fa00}
-.maroon{color:#600000}
-.maroon-background{background:#7d0000}
-.navy{color:#000060}
-.navy-background{background:#00007d}
-.olive{color:#606000}
-.olive-background{background:#7d7d00}
-.purple{color:#600060}
-.purple-background{background:#7d007d}
-.red{color:#bf0000}
-.red-background{background:#fa0000}
-.silver{color:#909090}
-.silver-background{background:#bcbcbc}
-.teal{color:#006060}
-.teal-background{background:#007d7d}
-.white{color:#bfbfbf}
-.white-background{background:#fafafa}
-.yellow{color:#bfbf00}
-.yellow-background{background:#fafa00}
-span.icon>.fa{cursor:default}
-a span.icon>.fa{cursor:inherit}
-.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
-.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
-.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
-.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
-.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
-.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
-.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
-.conum[data-value] *{color:#fff!important}
-.conum[data-value]+b{display:none}
-.conum[data-value]::after{content:attr(data-value)}
-pre .conum[data-value]{position:relative;top:-.125em}
-b.conum *{color:inherit!important}
-.conum:not([data-value]):empty{display:none}
-dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
-h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
-p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
-p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
-p{margin-bottom:1.25rem}
-.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
-.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
-.print-only{display:none!important}
-@page{margin:1.25cm .75cm}
-@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
-html{font-size:80%}
-a{color:inherit!important;text-decoration:underline!important}
-a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
-a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
-abbr[title]::after{content:" (" attr(title) ")"}
-pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
-thead{display:table-header-group}
-svg{max-width:100%}
-p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
-h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
-#header,#content,#footnotes,#footer{max-width:none}
-#toc,.sidebarblock,.exampleblock>.content{background:none!important}
-#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
-body.book #header{text-align:center}
-body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
-body.book #header .details{border:0!important;display:block;padding:0!important}
-body.book #header .details span:first-child{margin-left:0!important}
-body.book #header .details br{display:block}
-body.book #header .details br+span::before{content:none!important}
-body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
-body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
-.listingblock code[data-lang]::before{display:block}
-#footer{padding:0 .9375em}
-.hide-on-print{display:none!important}
-.print-only{display:block!important}
-.hide-for-print{display:none!important}
-.show-for-print{display:inherit!important}}
-@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
-.sect1{padding:0!important}
-.sect1+.sect1{border:0}
-#footer{background:none}
-#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
-@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
-</style>
-</head>
-<body class="article toc2 toc-left">
-<div id="header">
-<h1>Ben&#8217;s reference manual</h1>
-<div class="details">
-<span id="author" class="author">Mehdi Dogguy and Stéphane Glondu</span><br>
-<span id="revnumber">version 0.9.1</span>
-</div>
-<div id="toc" class="toc2">
-<div id="toctitle">Table of Contents</div>
-<ul class="sectlevel1">
-<li><a href="#_introduction">Introduction</a></li>
-<li><a href="#_getting_the_source_code">1. Getting the source code</a></li>
-<li><a href="#_query_language">2. Query language</a></li>
-<li><a href="#_frontends">3. Frontends</a>
-<ul class="sectlevel2">
-<li><a href="#_download">3.1. download</a></li>
-<li><a href="#_query">3.2. query</a></li>
-<li><a href="#_monitor">3.3. monitor</a></li>
-<li><a href="#_tracker">3.4. tracker</a></li>
-<li><a href="#_rebuild">3.5. rebuild</a></li>
-<li><a href="#_migrate">3.6. migrate</a></li>
-</ul>
-</li>
-<li><a href="#_reporting_issues">4. Reporting issues</a></li>
-</ul>
-</div>
-</div>
-<div id="content">
-<div id="preamble">
-<div class="sectionbody">
-<div class="paragraph">
-<p>Manual&#8217;s licence</p>
-</div>
-<div class="paragraph">
-<p>This manual is free software; you may redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.</p>
-</div>
-<div class="paragraph">
-<p>This is distributed in the hope that it will be useful, but without
-any warranty; without even the implied warranty of merchantability or
-fitness for a particular purpose. See the GNU General Public License
-for more details.</p>
-</div>
-<div class="paragraph">
-<p>A copy of the GNU General Public License is available as
-/usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
-or on the World Wide Web at the GNU web site. You can also obtain it
-by writing to the Free Software Foundation, Inc., 51 Franklin Street,
-Fifth Floor, Boston, MA 02110-1301, USA.</p>
-</div>
-<div class="admonitionblock warning">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAADAFBMVEUIAAAQAAAYAAAhAAApAAAxAABCAABKAABSAABaAABrAABzAAB7AACEAACMAACUAACUe3ucUlKcWlqce3ulAAClOTmlSkqlhISllJSlpaWtAACtMTGtlJS1AAC1KSm1jIy1nJy1paW1tbW9AAC9ra29tbXGAADGEBDGGBjGxsbOAADOEBDOGBjOKSnWAADWKSnW1tbeAADe3t7nAADnISHn5+fvAADvCAjv7+/3AAD39/f/AAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9wO+OUAAAAAWJLR0QAiAUdSAAAAOhJREFUeNptkn1vgjAQxu+UTdzmxOmmAzUOF4UlvJUlbQ3f/3Ot7HpQk17/oDw/nufSHtBRiZpLkQD0yFfHhFayVw5IP6Tmyoj0QOXvo27IVlmQv7m6IZ/qH6T8/WFZjh7ocs4/BziXQx8QK85ZIgYlp31BnXB0PMHHxu5lBPWRwWUKoXTA4Gge8Fn7HO0MX7XPoUPceB36aRL7HedF6e/xEroOMZ4Dx3MUO1CnzL4cpjhraVutBXQOWfxYfSv621X7692t699I0Dxu6R2pIh6U8WSObnKGmZs+sqVVRML9S27fa1s70rs/MAVuIb+cA3EAAABDdEVYdFNvZnR3YXJlAEAoIylJbWFnZU1hZ2ljayA0LjIuOCA5OS8wOC8wMSBjcmlzdHlAbXlzdGljLmVzLmR1cG9udC5jb22RuiG4AAAAKnRFWHRTaWduYXR1cmUAYzQyYjdkMmQ1NjRhYWI1ODg4OTE5Nzk3MDNmMDJiNDVPEd+TAAAADnRFWHRQYWdlADI0eDI0KzArMHJbCTEAAAAASUVORK5CYII=" alt="Warning">
-</td>
-<td class="content">
-This document is still work in progress!
-</td>
-</tr>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_introduction">Introduction</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p><em>Ben</em> is the name of a set of utilities written in
-<a href="http://caml.inria.fr">OCaml</a> and available through the <code>ben</code>
-command. The major feature of <em>Ben</em> is to provide a full featured
-transition tracker to follow the evolution of a set of packages in the
-Debian archive.</p>
-</div>
-<div class="paragraph">
-<p>The aim of this document is to describe the features of <em>Ben</em> and its
-configuration.</p>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_getting_the_source_code">1. Getting the source code</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p><em>Ben</em> is maintained in a Git repository available online at
-<a href="https://salsa.debian.org/debian/ben" class="bare">https://salsa.debian.org/debian/ben</a>. Getting the
-sources is as simple as:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="highlight"><code class="language-shell" data-lang="shell">git clone https://salsa.debian.org/debian/ben</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The source tree has a <code>debian/</code> directory. It is a native
-Debian package, so you can use the standard building tools in order to
-build it.</p>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_query_language">2. Query language</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>The main feature of <em>Ben</em> is a transition tracker. The
-transition tracker selects a set of affected packages and computes a
-state for each of them. There exist already various ways to do
-that. One solution would be to use the
-<a href="https://packages.debian.org/sid/dctrl-tools">dctrl-tools</a>. We chose to
-make our own language. This allows us to perform more fine-grained
-queries, optimize queries and extend the query language easily.</p>
-</div>
-<div class="paragraph">
-<p>A ben query is described by the following
-<a href="https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">BNF</a> formulae:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;query&gt; ::= true
-          | false
-          | ! &lt;query&gt;            /* Boolean negation     */
-          | &lt;query&gt; '|' &lt;query&gt;  /* Boolean OR operator  */
-          | &lt;query&gt; &amp; &lt;query&gt;    /* Boolean AND operator */
-          | ( &lt;query&gt; )
-/*set 2*/ | &lt;field&gt; ~ /&lt;regex&gt;/
-          | &lt;field&gt; ~ "&lt;list&gt;"
-          | source
-          | &lt;comparison&gt; "&lt;string&gt;"
-          | &lt;field&gt; ~ "&lt;string&gt;" &lt;comparison&gt; "&lt;string&gt;"</pre>
-</div>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;field&gt; ::= .&lt;string&gt;</pre>
-</div>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;list&gt;  ::= &lt;string&gt;
-          | &lt;string&gt; '|' &lt;list&gt;</pre>
-</div>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>&lt;comparison&gt; ::= '&lt;&lt;' | '&lt;' | '&gt;' | '&gt;&gt;' | '=' | '&lt;=' | '&gt;='</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The first rules are the usual boolean constants and operators. The
-sixth rule is useful to group queries and override boolean operators'
-priotity.</p>
-</div>
-<div class="paragraph">
-<p>The second set are the various type of queries implemented to match
-against different criteria. It matches against a package field (in
-lowercase).</p>
-</div>
-<div class="paragraph">
-<p>We believe the syntax of queries is easy to grasp. Nonetheless,
-here are some exemples:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>.build-depends ~ /lib.*ocaml-dev/</code><br>
-This query matches all packages that build-depend on a package
-whose name matches the <a href="http://perldoc.perl.org/perlre.html">Perl
-regular expression</a> <code>lib.*ocaml-dev</code>.</p>
-</li>
-<li>
-<p><code>.depends ~ "libapt-pkg4.12"</code><br>
-This one is simpler than the first one in the sense that
-<code>libapt-pkg4.12</code> is considered as a plain string and not a regular
-expression.</p>
-</li>
-</ul>
-</div>
-<div class="admonitionblock important">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA5FBMVEUQAAAQEBAYGBgpKSk5OTlCQjFaWiljYxhCQkJSUlJra0JjY1Jzc1JjY2Nra2t7e3uMjBiMjDm9vQitrSGtrTmcnFqMjHucnGOcnHu1tUq1tVK9vVqlpWOtrWutrXve3gDW1hje3iHe3jHe3jnn5wjv7wDv7xD//wD//wj//xDn5ynn5zHv7zH//yHGxlrW1lLOznPW1mPW1mvv70Ln52Pn53uEhISMjIyUlJSlpYStrYylpZSlpZy9vYS9vZylpaWtraWtra21tbW9vb3GxsbOzs7W1tbe3t7n5+fv7+/39/f///+t0sPeAAAAAWJLR0RDZ9ANYgAAARdJREFUeNptkgtTwjAMxzNF8TGVocDUyUvcUFQUlJWJRiedtfv+38euj1Hv9r/rXZJfH2kSyEuxQqUHJrpGgigW5Tbg3/FyGBb68GO6AYwEL5HRtIVcA07ew2ijsJsqIOIycOO5PYU6qQT0Su33AHaVFQY/ArCVvv8IoDbU73wKQBN99wJg/17bPoMcr7VzClC/1XZCgaHJqOlAw2Q2IhbobztnlWBQc84rwd3e1nMlmMfHryVAyFOdezTx3L6VVZ4ttXMi/jHRh9/EP/hqqjwXYGcgrfFlWtQqC9QrvYPDptoyw19Zduwq/8EUpOiVbBR2rH6MZwtathZbj3OT9AVZW8OQYTsZCT357S/2b0rEmBAhpGaA/gCdY2yvUm3MUgAAAEN0RVh0U29mdHdhcmUAQCgjKUltYWdlTWFnaWNrIDQuMi44IDk5LzA4LzAxIGNyaXN0eUBteXN0aWMuZXMuZHVwb250LmNvbZG6IbgAAAAqdEVYdFNpZ25hdHVyZQBjM2VjYzFmYzUxMzVkMWU5NTk2OTVlNTY5ZDIxMzEyMnIOafAAAAAASUVORK5CYII=" alt="Important">
-</td>
-<td class="content">
-Note the symbols around the selectors: /&#8230;&#8203;/ for
-regular expressions and "&#8230;&#8203;" for plain strings.
-</td>
-</tr>
-</table>
-</div>
-<div class="admonitionblock warning">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAADAFBMVEUIAAAQAAAYAAAhAAApAAAxAABCAABKAABSAABaAABrAABzAAB7AACEAACMAACUAACUe3ucUlKcWlqce3ulAAClOTmlSkqlhISllJSlpaWtAACtMTGtlJS1AAC1KSm1jIy1nJy1paW1tbW9AAC9ra29tbXGAADGEBDGGBjGxsbOAADOEBDOGBjOKSnWAADWKSnW1tbeAADe3t7nAADnISHn5+fvAADvCAjv7+/3AAD39/f/AAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9wO+OUAAAAAWJLR0QAiAUdSAAAAOhJREFUeNptkn1vgjAQxu+UTdzmxOmmAzUOF4UlvJUlbQ3f/3Ot7HpQk17/oDw/nufSHtBRiZpLkQD0yFfHhFayVw5IP6Tmyoj0QOXvo27IVlmQv7m6IZ/qH6T8/WFZjh7ocs4/BziXQx8QK85ZIgYlp31BnXB0PMHHxu5lBPWRwWUKoXTA4Gge8Fn7HO0MX7XPoUPceB36aRL7HedF6e/xEroOMZ4Dx3MUO1CnzL4cpjhraVutBXQOWfxYfSv621X7692t699I0Dxu6R2pIh6U8WSObnKGmZs+sqVVRML9S27fa1s70rs/MAVuIb+cA3EAAABDdEVYdFNvZnR3YXJlAEAoIylJbWFnZU1hZ2ljayA0LjIuOCA5OS8wOC8wMSBjcmlzdHlAbXlzdGljLmVzLmR1cG9udC5jb22RuiG4AAAAKnRFWHRTaWduYXR1cmUAYzQyYjdkMmQ1NjRhYWI1ODg4OTE5Nzk3MDNmMDJiNDVPEd+TAAAADnRFWHRQYWdlADI0eDI0KzArMHJbCTEAAAAASUVORK5CYII=" alt="Warning">
-</td>
-<td class="content">
-Packages fields may contain a list of values
-comma-separated. <em>Ben</em> splits the list before looking with
-"&#8230;&#8203;" for a match.
-</td>
-</tr>
-</table>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>&gt;= "3.0"</code><br>
-The query <code>&gt;= "3.0"</code> matches all packages with a version number
-equal to or higher than "3.0".</p>
-</li>
-<li>
-<p><code>source</code><br>
-This matches all source packages.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Now that the concept of query is explained, we will focus on other
-parts of <em>Ben</em>. We will see how we can use the queries for each
-frontend.</p>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_frontends">3. Frontends</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p><em>Ben</em> is a set of utilities available through the <code>ben</code> command. Each
-utility is called a <em>frontend</em> and there are four:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>download</code></p>
-</li>
-<li>
-<p><code>query</code></p>
-</li>
-<li>
-<p><code>monitor</code></p>
-</li>
-<li>
-<p><code>tracker</code></p>
-</li>
-<li>
-<p><code>rebuild</code></p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>All frontends share a set of options and each one defines its own
-specific set. The shared set of command-line options is:</p>
-</div>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Option</th>
-<th class="tableblock halign-left valign-top">Action</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--no-benrc</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Do not read .benrc file at startup</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--dry-run|-n</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Dry run</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--parallel|-P</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Set parallelism level</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--quiet|-q</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Quiet mode</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--verbose</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Verbose mode</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--mirror uri</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Package mirror to use</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--mirror-binaries uri</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Package mirror to use for binaries</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--mirror-sources  uri</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Package mirror to use for sources</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--areas a,&#8230;&#8203;</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Areas to consider (comma separated)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--archs a,&#8230;&#8203;</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Architectures to consider (comma separated)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--suite a</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Suite</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--cache-dir d</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Path to cache dir</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--cache|-C f</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specify the name of the cache file</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--use-cache</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Use cache whenever possible</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--config|-c c</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Config file</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--more-binary-keys l</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Comma separated list of further relevant binary keys</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--more-source-keys l</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Comma separated list of further relevant source keys</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--preferred-compression-format|-z format</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Preferred compression format (Default: Gzip)</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--version|-V</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Display version number (and build date) and exit.</p></td>
-</tr>
-</tbody>
-</table>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAAAAADFHGIkAAAAAmJLR0QAAKqNIzIAAAEESURBVHjaZZIhksMwDEV9voWFSwsLA0MLDf8VdARBUUNBQ1FBHcErZ5M0baXJjOPnb0vfLuMMn3H+lWMgBKL89A1Eq9Q9IrwB+gIOsnMPBR8giMclguQfBGS8x5xIoPQxnxqb4LL/eQ4l2AVNONP2ZshLCqJ3qqzWtT5pNgNnLU4OcNbuiqaLmFmHGhJ0TCMC99+f2wphlhaOYjuQVc0IIzLH2BRWfQoWsNSjct8AVop4rF3belTuVAb3MRj6kLrcTwtIy+g03V1vC57t1XrMzqfP5pln5yLTkk7+5UhstvOni1X3ixLEdf2c36+W0Q7kOb48hnSRLI/XdNPfX4kpMkgP5R+elfdkDPprQgAAAEN0RVh0U29mdHdhcmUAQCgjKUltYWdlTWFnaWNrIDQuMi44IDk5LzA4LzAxIGNyaXN0eUBteXN0aWMuZXMuZHVwb250LmNvbZG6IbgAAAAqdEVYdFNpZ25hdHVyZQAzYmQ3NDdjNWU0NTgwNzAwNmIwOTBkZDNlN2EyNmM0NBTTk/oAAAAOdEVYdFBhZ2UAMjR4MjQrMCswclsJMQAAAABJRU5ErkJggg==" alt="Note">
-</td>
-<td class="content">
-The order of command-line flags is significant. More specifically, --config
-specifies a configuration file which may set other configuration keys (e.g.: areas,
-archs, suite, etc&#8230;&#8203;).
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>Ben knows about the following compression formats: Gzip, Bz2, Xz and Plain (for
-no compression).</p>
-</div>
-<div class="paragraph">
-<p>By default, Ben keeps the following defined subset of field names. In fact, there
-are two subsets. The first one is for binary packages (Package, Source, Version,
-Maintainer, Architecture, Provides, Depends, Pre-Depends, Conflicts, Breaks) and
-the second one for source packages (Package, Source, Version, Maintainer, Binary,
-Build-depends, Build-depends-indep, Build-depends-arch). If your analysis requires
-more fields, you may use --more-binary-keys and --more-source-keys command-line flags
-to specify your needs.</p>
-</div>
-<div class="paragraph">
-<p>The rest of this section describes each frontend.</p>
-</div>
-<div class="sect2">
-<h3 id="_download">3.1. download</h3>
-<div class="paragraph">
-<p>This frontend is the simplest one as it has no command-line options,
-except the shared ones. It downloads all Sources.gz files and all
-Packages.gz files for selected architectures and areas. You may
-invoke it by running:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ ben download [options]</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>The requested files will be downloaded in $BEN_CACHE_DIR, if set, or
-in the current directory.</p>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAAAAADFHGIkAAAAAmJLR0QAAKqNIzIAAAEESURBVHjaZZIhksMwDEV9voWFSwsLA0MLDf8VdARBUUNBQ1FBHcErZ5M0baXJjOPnb0vfLuMMn3H+lWMgBKL89A1Eq9Q9IrwB+gIOsnMPBR8giMclguQfBGS8x5xIoPQxnxqb4LL/eQ4l2AVNONP2ZshLCqJ3qqzWtT5pNgNnLU4OcNbuiqaLmFmHGhJ0TCMC99+f2wphlhaOYjuQVc0IIzLH2BRWfQoWsNSjct8AVop4rF3belTuVAb3MRj6kLrcTwtIy+g03V1vC57t1XrMzqfP5pln5yLTkk7+5UhstvOni1X3ixLEdf2c36+W0Q7kOb48hnSRLI/XdNPfX4kpMkgP5R+elfdkDPprQgAAAEN0RVh0U29mdHdhcmUAQCgjKUltYWdlTWFnaWNrIDQuMi44IDk5LzA4LzAxIGNyaXN0eUBteXN0aWMuZXMuZHVwb250LmNvbZG6IbgAAAAqdEVYdFNpZ25hdHVyZQAzYmQ3NDdjNWU0NTgwNzAwNmIwOTBkZDNlN2EyNmM0NBTTk/oAAAAOdEVYdFBhZ2UAMjR4MjQrMCswclsJMQAAAABJRU5ErkJggg==" alt="Note">
-</td>
-<td class="content">
-<code>ben download</code> doesn&#8217;t read <code>ben.cache</code> files yet.
-</td>
-</tr>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_query">3.2. query</h3>
-<div class="paragraph">
-<p>This utility is pretty much like
-<a href="http://man.cx/grep-dctrl(1)"><code>grep-dctrl(1)</code></a>. Given a list of Packages
-or Sources files, it performs a query and outputs the result.</p>
-</div>
-<div class="paragraph">
-<p>Using it is as simple as shown below:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ ben query ".package ~ /gentoo/" Packages</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Other valid uses:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ zcat Packages.gz | ben query ".package ~ /gentoo/" -
-[...]
-$ ben query ".package ~ /gentoo/" Packages_foo.gz Packages_bar.bz2 Packages_baz.xz
-[...]
-$ ben query ".package ~ /gentoo/" monitor.cache
-[...]</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Just like <code>grep-dctrl(1)</code>, <code>ben query</code> has a simple mechanism to
-filter its output. Using the command-line option <code>-s</code>, one can specify
-a comma-separated list of fields that will be shown for matching
-paragraphs.</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ ben query ".package ~ /gentoo/" -s Package,Version ...</pre>
-</div>
-</div>
-<div class="admonitionblock tip">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAYCAAAAAAq3gkaAAAAAmJLR0QAAKqNIzIAAADbSURBVHjadZK7EcMgDEAZISt4jKySNqVLl6zgUitoBEq3lBqBlhFUEmFLCgkJPt+Bnv5SaH5qP+9nMHFGQJSf+IPwIaLK8mUAGkgFLO6FAJ0wHNyGeJiUCDCRJnAKhBBeFhyXtapK6cQ1ebs99ErYCSULUDwPhirEn3uMrpSohYqW1xLCavcKI4H7N7Fe8fOfzUx+2RQhPY2ZoOQmVcykOwqNkSZyHGffikbibYmszanXFFD9lazWO9nkEgzzb3QCnTZC9koS5HFDCuxYZHUIwOqz3WldCH1PTPACNCsUfCkgLe0AAABDdEVYdFNvZnR3YXJlAEAoIylJbWFnZU1hZ2ljayA0LjIuOCA5OS8wOC8wMSBjcmlzdHlAbXlzdGljLmVzLmR1cG9udC5jb22RuiG4AAAAKnRFWHRTaWduYXR1cmUAZWU5ZDg3NzM5NmNlMjY3YWViMDE3OWQzNWY4MWIyYWMSM/onAAAADnRFWHRQYWdlADI1eDI0KzArML7xCa8AAAAASUVORK5CYII=" alt="Tip">
-</td>
-<td class="content">
-ben query considers files matching <code>[sS]ources.*</code> to be Sources
-files, to be able to make the distinction with Packages files. This is
-useful especially when you use the <code>source</code> predicate.
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>While other frontends can take advantage from multi-core architectures, ben
-query is still sequential. This may be fixed in future versions.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_monitor">3.3. monitor</h3>
-<div class="paragraph">
-<p>The <code>monitor</code> fontend builds a monitoring page for a transition. A
-transition is described by three queries:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>is_affected</code>: matches source packages that are part of this
-transition; this query is evaluated against all source and binary
-packages and, for binary packages, their source package is picked;</p>
-</li>
-<li>
-<p><code>is_good</code>: matches binary packages that are considered to be
-ready (fixed) for this transition;</p>
-</li>
-<li>
-<p><code>is_bad</code>: matches binary packages that are considered to be broken
-(not fixed) for this transition.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Note that some packages can be neither good nor bad. For example, there
-are many packages that build-depend on some library but do not link
-against it. Thus, they do not need any dependency on the library at
-runtime.</p>
-</div>
-<div class="paragraph">
-<p>Following previously defined criteria, packages will be divided into 4
-categories:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>Good (✔) packages, matching <code>is_good</code> criterion</p>
-</li>
-<li>
-<p>Bad (✘) packages, matching <code>is_bad</code> criterion</p>
-</li>
-<li>
-<p>Partial (⁈) packages, matching both <code>is_good</code> and <code>is_bad</code> criteria</p>
-</li>
-<li>
-<p>Unknown state, mathing neither <code>is_good</code> nor <code>is_bad</code></p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>An example of a complete description of a transition is:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>is_affected = .build-depends ~ /libicu-dev/;
-is_good = .depends ~ /libicu44/;
-is_bad = .depends ~ /libicu42/;</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>There are other optional fields:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>title</code><br>
-This puts a nice title in the HTML page.</p>
-</li>
-<li>
-<p><code>notes</code><br>
-This can be used to put
-remarks about the transition or notes about the status of some
-packages or the whole transition.<br>
-+
-<em>Ben</em> recognizes some special texts and turns them into links.
-The following formats are recognized:</p>
-</li>
-</ul>
-</div>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Original text</th>
-<th class="tableblock halign-left valign-top">Result</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">pts:ocaml</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://tracker.debian.org/ocaml">pts:ocaml</a></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">buildd:ocaml</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://buildd.debian.org/ocaml">buildd:ocaml</a></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">#123456</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://bugs.debian.org/123456">#123456</a></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">&lt;msg-id&gt;</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://lists.debian.org/msg-id" class="bare">https://lists.debian.org/msg-id</a></p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">http://example.com</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="http://example.com" class="bare">http://example.com</a></p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p><code>monitor</code> understands the following list of command-line options:</p>
-</div>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Option</th>
-<th class="tableblock halign-left valign-top">Action</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--run-debcheck</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Run dose-debcheck and add virtual <code>.uninstallable</code> field</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--use-projectb</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Get package lists from Projectb database</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--output|-o file</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Select output file</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--output-format|-f fmt</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Select output format</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--stdin</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Use stdin to read the input file</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--template template</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Select an HTML template</p></td>
-</tr>
-</tbody>
-</table>
-<div class="paragraph">
-<p>Output can be formatted in simple text (<code>text</code>), colored text (<code>color</code>),
-Xhtml (<code>xhtml</code>), Json (<code>json</code>) or dependency levels (<code>levels</code>). <code>html</code> is
-an alias for <code>xhtml</code>.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_tracker">3.4. tracker</h3>
-<div class="paragraph">
-<p>This frontend uses <code>monitor</code> to generate a summary page about all
-known transitions. An example of such summary can be found at
-<a href="https://release.debian.org/transitions/" class="bare">https://release.debian.org/transitions/</a>.</p>
-</div>
-<div class="paragraph">
-<p><code>tracker</code> has a notion of <code>profiles</code> that gives a hint on the
-actual state of the transition. The default profiles are:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>planned</code> for known planned transitions or requested but not
-processed or acknowledged yet;</p>
-</li>
-<li>
-<p><code>permanent</code> is a special profile made to keep an eye on some set of
-packages, not necessarily a transition;</p>
-</li>
-<li>
-<p><code>ongoing</code> for the actual list of (known) on-going transitions;</p>
-</li>
-<li>
-<p><code>finished</code> has a list of some transitions that are almost finished
-(e.g. new binary packages migrated but old binary packages left in
-testing to not decrease installability, or a finished transition
-with a number of still broken packages in testing).</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Technically, each <code>profile</code> is a sub-directory of the global config
-directory<sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup>. The
-latter can be specified by a command-line option.</p>
-</div>
-<div class="paragraph">
-<p>By default, <code>tracker</code> looks for a directory named <code>config</code> which
-should contain a file named <code>global.conf</code>, unless otherwise told. It
-reads data (<code>.ben</code> files) from the <code>config</code> directory and outputs the
-result in the <code>base</code> directory.</p>
-</div>
-<div class="paragraph">
-<p><code>tracker</code> has the following command-line options:</p>
-</div>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 50%;">
-<col style="width: 50%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Option</th>
-<th class="tableblock halign-left valign-top">Action</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--base|-b [dir]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies the "base" directory</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--config-dir|-cd [dir]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Location of ben trackers</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--global-conf|-g</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Specify tracker&#8217;s global configuration file</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--transition|-t [profile/transition]</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Generate only that tracker page</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--update|-u</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Updates cache files</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--use-projectb</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Get package lists from Projectb database</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--template template</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Select an HTML template</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><p class="tableblock">--no-clean</p></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">Leave unknown generated HTML files</p></td>
-</tr>
-</tbody>
-</table>
-<div class="sect3">
-<h4 id="_html_templates">3.4.1. HTML Templates</h4>
-<div class="paragraph">
-<p>Ben has a simple templating mechanism to generate customized HTML
-pages. Templates are loaded dynamically when <code>monitor</code> or <code>tracker</code>
-frontends are used. When none specified, Ben chooses to load the
-Debian template.</p>
-</div>
-<div class="paragraph">
-<p>You can write your own HTML template for Ben. All you have to do is to
-install the package <code>libben-ocaml-dev</code> which provides the Ben
-library. We recommend users to start from an existing template to ease
-the task. You can compile a template (e.g. named <code>foo</code>) by running the
-following commands:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ ocamlbuild -pkg ben foo.cmx
-$ ocamlopt -shared -o foo.cmxs _build/foo.cmx</pre>
-</div>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAAAAADFHGIkAAAAAmJLR0QAAKqNIzIAAAEESURBVHjaZZIhksMwDEV9voWFSwsLA0MLDf8VdARBUUNBQ1FBHcErZ5M0baXJjOPnb0vfLuMMn3H+lWMgBKL89A1Eq9Q9IrwB+gIOsnMPBR8giMclguQfBGS8x5xIoPQxnxqb4LL/eQ4l2AVNONP2ZshLCqJ3qqzWtT5pNgNnLU4OcNbuiqaLmFmHGhJ0TCMC99+f2wphlhaOYjuQVc0IIzLH2BRWfQoWsNSjct8AVop4rF3belTuVAb3MRj6kLrcTwtIy+g03V1vC57t1XrMzqfP5pln5yLTkk7+5UhstvOni1X3ixLEdf2c36+W0Q7kOb48hnSRLI/XdNPfX4kpMkgP5R+elfdkDPprQgAAAEN0RVh0U29mdHdhcmUAQCgjKUltYWdlTWFnaWNrIDQuMi44IDk5LzA4LzAxIGNyaXN0eUBteXN0aWMuZXMuZHVwb250LmNvbZG6IbgAAAAqdEVYdFNpZ25hdHVyZQAzYmQ3NDdjNWU0NTgwNzAwNmIwOTBkZDNlN2EyNmM0NBTTk/oAAAAOdEVYdFBhZ2UAMjR4MjQrMCswclsJMQAAAABJRU5ErkJggg==" alt="Note">
-</td>
-<td class="content">
-.cmxs files are native dynamically loadable shared modules. If
-you&#8217;re building on a bytecode-only architecture, you should build a
-<code>foo.cma</code> instead.
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>If your template needs a CSS (Cascading Style Sheets) or some images,
-you should install them under <code>/usr/share/ben/media</code>.</p>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_rebuild">3.5. rebuild</h3>
-<div class="paragraph">
-<p>This frontend recompiles a set of packages matching a query,
-respecting the order of build-dependencies inside the set. It takes
-as command-line argument a configuration file with the following keys:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><code>is_affected</code>: the query used to select packages;</p>
-</li>
-<li>
-<p><code>rebuild_command</code>: the command used to rebuild a given package.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>It outputs in Makefile syntax the dependency graph of packages that
-could not be built.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_migrate">3.6. migrate</h3>
-<div class="paragraph">
-<p>This frontend simulates a migration of some packages from unstable to
-testing. It is useful to investigate Britney&#8217;s behaviour. It outputs
-information related to the migration of the given packages, the
-resulting Sources and Packages_* files, and an easy hint.</p>
-</div>
-<div class="paragraph">
-<p>Note that the generated hint is not guaranteed to succeed. Moreover,
-this command does not take into account ages, RC bugs, tests&#8230;&#8203; as
-Britney does.</p>
-</div>
-<div class="paragraph">
-<p>A typical workflow is:</p>
-</div>
-<div class="literalblock">
-<div class="content">
-<pre>$ cd /an/empty/working/dir
-$ source /usr/share/doc/ben/examples/migrate/functions.sh
-$ update
-$ migrate package1 package2 package3
-$ debcheck</pre>
-</div>
-</div>
-<div class="paragraph">
-<p>If the <code>debcheck</code> function above does not report significant
-differences, there are good chances that the generated hint will
-succeed. However, in this situation, Britney usually manages to
-migrate the packages on its own.</p>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_reporting_issues">4. Reporting issues</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>Please report bugs against <em>Ben</em> through the Debian BTS. Reported bugs
-can be seen on <a href="https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&amp;src=ben" class="bare">https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&amp;src=ben</a></p>
-</div>
-</div>
-</div>
-</div>
-<div id="footnotes">
-<hr>
-<div class="footnote" id="_footnotedef_1">
-<a href="#_footnoteref_1">1</a>. <a href="https://release.debian.org/transitions/config/" class="bare">https://release.debian.org/transitions/config/</a>
-</div>
-</div>
-<div id="footer">
-<div id="footer-text">
-Version 0.9.1<br>
-Last updated 2020-09-27 09:40:02 UTC
-</div>
-</div>
-</body>
-</html>
\ No newline at end of file
diff -pruN 0.9.2/examples/migrate/extract-uninstallables.py 0.10.0/examples/migrate/extract-uninstallables.py
--- 0.9.2/examples/migrate/extract-uninstallables.py	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/migrate/extract-uninstallables.py	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import sys
+import yaml
+
+debcheck = yaml.safe_load(sys.stdin)
+broken_packages = [p["package"] for p in debcheck["report"] if p["status"] == "broken"]
+broken_packages.sort()
+
+for p in broken_packages:
+    print(p)
diff -pruN 0.9.2/examples/migrate/functions.sh 0.10.0/examples/migrate/functions.sh
--- 0.9.2/examples/migrate/functions.sh	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/examples/migrate/functions.sh	2022-01-22 07:08:05.000000000 +0000
@@ -37,11 +37,17 @@ migrate () {
     cd ..
 }
 
+get_uninstallables () {
+    dose-debcheck --failures --explain $1 |
+    $BEN_PATH/examples/migrate/extract-uninstallables.py
+}
+
 debcheck () {
     cd $THIS_PATH
     for u in testing/Packages_*; do
         u=${u##*/}
         echo "=====> $u <=====";
-        diff -u <(dose-debcheck --failures --explain testing/$u) <(dose-debcheck --failures --explain new/$u)
+        diff -u <(get_uninstallables testing/$u) <(get_uninstallables new/$u)
+        if [ $? -ne 0 ]; then return $?; fi
     done
 }
diff -pruN 0.9.2/examples/ocaml-transition-scripts/ben/download.ben 0.10.0/examples/ocaml-transition-scripts/ben/download.ben
--- 0.9.2/examples/ocaml-transition-scripts/ben/download.ben	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/ben/download.ben	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,7 @@
+mirror = "http://deb.debian.org/debian";
+suite = "unstable";
+areas = [ "main"; "contrib"; "non-free" ];
+
+architectures = [
+    "amd64"
+];
diff -pruN 0.9.2/examples/ocaml-transition-scripts/ben/download-testing.ben 0.10.0/examples/ocaml-transition-scripts/ben/download-testing.ben
--- 0.9.2/examples/ocaml-transition-scripts/ben/download-testing.ben	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/ben/download-testing.ben	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,6 @@
+mirror = "http://deb.debian.org/debian";
+suite = "testing";
+areas = [ "main"; "contrib"; "non-free" ];
+
+architectures = [
+];
diff -pruN 0.9.2/examples/ocaml-transition-scripts/ben/rebuild.ben 0.10.0/examples/ocaml-transition-scripts/ben/rebuild.ben
--- 0.9.2/examples/ocaml-transition-scripts/ben/rebuild.ben	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/ben/rebuild.ben	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,12 @@
+architectures = [ "amd64" ];
+
+is_affected = .maintainer ~ /debian-ocaml-maint/
+            | .build-depends ~ /ocaml/
+            | .build-depends-arch ~ /ocaml/
+            | .build-depends-indep ~ /ocaml/;
+
+rebuild_command = "../usr/bin/rebuild.sh";
+check_command = "../usr/lib/ben-checker.sh";
+stop_command = "../usr/lib/ben-stopper.sh";
+promote_command = "../usr/lib/ben-promoter.sh";
+update_command = "../usr/lib/ben-updater.sh";
diff -pruN 0.9.2/examples/ocaml-transition-scripts/bin/create-transition.sh 0.10.0/examples/ocaml-transition-scripts/bin/create-transition.sh
--- 0.9.2/examples/ocaml-transition-scripts/bin/create-transition.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/bin/create-transition.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+if [ "$#" -lt 2 ]; then
+    echo "Usage: $0 <version> <path>"
+    exit 1
+fi
+
+VERSION=$1
+BASE=$2/ocaml-$VERSION
+THIS=$(dirname $(dirname $0))
+
+mkdir -p $BASE
+cd $BASE
+mkdir -p ben build pool
+ln -sfT $THIS usr
+
+cat > pool/apt-ftparchive.conf <<EOF
+APT::FTPArchive::Release {
+        Origin "ocaml.debian.net";
+        Label "ocaml-$VERSION";
+        Suite "unstable-ocaml";
+        Architectures "source amd64";
+        Description "Debian packages rebuilt for transition to OCaml $VERSION";
+};
+EOF
+
+touch pool/stamp && make -C pool -f ../usr/lib/Makefile.pool
+
+if ! [ -f build/ocaml-$VERSION.tgz ]; then
+    sudo ./usr/lib/create-chroot.sh $VERSION $BASE
+fi
diff -pruN 0.9.2/examples/ocaml-transition-scripts/bin/rebuild-loop.sh 0.10.0/examples/ocaml-transition-scripts/bin/rebuild-loop.sh
--- 0.9.2/examples/ocaml-transition-scripts/bin/rebuild-loop.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/bin/rebuild-loop.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -e
+
+doit () {
+    ( cd ben && env OMP_THREAD_LIMIT=1 DEB_BUILD_OPTIONS="parallel=1 $DEB_BUILD_OPTIONS" ben rebuild ../usr/ben/rebuild.ben -o ../missing.txt -j $(nproc) )
+
+    HAS_CHANGES=0
+    for u in build/*.changes; do
+        if [ -f "$u" ]; then
+            HAS_CHANGES=1
+            dcmd mv "$u" pool
+        fi
+    done
+    for u in build/*.log; do
+        if [ -f "$u" ]; then
+            mv "$u" pool
+        fi
+    done
+
+    if [ $HAS_CHANGES -eq 1 ]; then
+        touch pool/stamp && make -C pool -f ../usr/lib/Makefile.pool
+        usr/bin/update-chroot.sh
+    fi
+
+    return $HAS_CHANGES
+}
+
+while ! doit; do
+    true
+done
diff -pruN 0.9.2/examples/ocaml-transition-scripts/bin/rebuild.sh 0.10.0/examples/ocaml-transition-scripts/bin/rebuild.sh
--- 0.9.2/examples/ocaml-transition-scripts/bin/rebuild.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/bin/rebuild.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+set -o pipefail
+
+if [ -d ../build ]; then
+    cd ..
+fi
+
+PACKAGE=$1
+BASE=$PWD
+VERSION=${BASE##*-}
+
+if ! [ -f build/ocaml-$VERSION.tgz ]; then
+    echo "build/ocaml-$VERSION.tgz is missing!"
+    exit 1
+fi
+
+if [ "$USER" != "root" ]; then
+    echo "Must be run as root!"
+    exit 1
+fi
+
+/usr/bin/time pbuilder execute --basetgz build/ocaml-$VERSION.tgz --bindmounts "$BASE" -- usr/lib/pbuilder-rebuild.sh $BASE +o1 $PACKAGE $INTERACTIVE 2>&1 | tee build/$PACKAGE.log
diff -pruN 0.9.2/examples/ocaml-transition-scripts/bin/update-chroot.sh 0.10.0/examples/ocaml-transition-scripts/bin/update-chroot.sh
--- 0.9.2/examples/ocaml-transition-scripts/bin/update-chroot.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/bin/update-chroot.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+PACKAGE=$1
+BASE=$PWD
+VERSION=${BASE##*-}
+
+if ! [ -f build/ocaml-$VERSION.tgz ]; then
+    echo "build/ocaml-$VERSION.tgz is missing!"
+    exit 1
+fi
+
+pbuilder update --basetgz build/ocaml-$VERSION.tgz --bindmounts "$BASE"
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/ben-checker.sh 0.10.0/examples/ocaml-transition-scripts/lib/ben-checker.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/ben-checker.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/ben-checker.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+PACKAGE=$1
+
+cd ..
+
+if [ -f pool/$PACKAGE.fake ] || [ -f pool/${PACKAGE}_*.changes ]; then
+    # The package exists in the new universe, report success
+    exit 0
+elif [ -f pool/$PACKAGE.log ]; then
+    # A log already exists, do not retry to build
+    exit 2
+else
+    # Package status unknown, try to build it
+    exit 1
+fi
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/ben-promoter.sh 0.10.0/examples/ocaml-transition-scripts/lib/ben-promoter.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/ben-promoter.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/ben-promoter.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+PACKAGE=$1
+
+cd ..
+
+if [ -f build/$PACKAGE.log ]; then
+    mv build/$PACKAGE.log pool
+fi
+
+if [ -f build/${PACKAGE}_*.changes ]; then
+    dcmd mv build/${PACKAGE}_*.changes pool
+    exit 1
+fi
+
+exit 0
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/ben-stopper.sh 0.10.0/examples/ocaml-transition-scripts/lib/ben-stopper.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/ben-stopper.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/ben-stopper.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+[ -f ../build/stop ]
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/ben-updater.sh 0.10.0/examples/ocaml-transition-scripts/lib/ben-updater.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/ben-updater.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/ben-updater.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -e
+cd ..
+touch pool/stamp && make -C pool -f ../usr/lib/Makefile.pool
+usr/bin/update-chroot.sh
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/create-chroot.sh 0.10.0/examples/ocaml-transition-scripts/lib/create-chroot.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/create-chroot.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/create-chroot.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+VERSION=$1
+BASE=$2
+
+cd $BASE/build
+pbuilder create --basetgz ocaml-$VERSION.tgz --debootstrapopts --variant=minbase
+pbuilder execute --basetgz ocaml-$VERSION.tgz --bindmounts "$BASE" --save-after-exec -- ../usr/lib/pbuilder-setup-chroot.sh $VERSION $BASE/pool
+pbuilder update --basetgz ocaml-$VERSION.tgz --bindmounts "$BASE"
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/index.html.in 0.10.0/examples/ocaml-transition-scripts/lib/index.html.in
--- 0.9.2/examples/ocaml-transition-scripts/lib/index.html.in	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/index.html.in	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
+    <title>Preparation of OCaml transition to @OCamlVersion@</title>
+  </head>
+  <body>
+    <h1>Preparation of OCaml transition to @OCamlVersion@</h1>
+    <div><a href="..">Parent directory</a></div>
+    <div><a href="https://wiki.debian.org/Teams/OCamlTaskForce/OCamlTransitions">Transition page on Debian wiki</a></div>
+    <div><a href="https://wiki.debian.org/Teams/OCamlTaskForce/TODO">TODO page on Debian wiki</a></div>
+    <hr/>
+    <div>This is an unofficial repository of Debian packages compiled with OCaml @OCamlVersion@, using scripts available <a href="https://salsa.debian.org/debian/ben/-/tree/master/examples/ocaml-transition-scripts">here</a>. Most packages were taken from unstable when compiled, with no changes.</div>
+    <hr/>
+    <div>It is signed with my <a href="https://db.debian.org/fetchkey.cgi?fingerprint=58EB0999C64E897EE894B8037853DA4D49881AD3">key</a>. To use it, add the following lines to your /etc/apt/sources.list:</div>
+    <pre>deb https://ocaml.debian.net/transitions/ocaml-@OCamlVersion@/pool ./
+deb-src https://ocaml.debian.net/transitions/ocaml-@OCamlVersion@/pool ./</pre>
+    <div>To prefer (or not prefer) packages from this repository, use the following lines in your /etc/apt/preferences:</div>
+    <pre>Package: *
+Pin: release a=unstable-ocaml
+Pin-Priority: 1000</pre>
+    <div><b>Disclaimer:</b> this repository is not frequently updated. I do not recommend to use it on a production system. You can typically use it in a chroot to debug building packages with OCaml @OCamlVersion@.</div>
+    <hr/>
+    <div><a href="pool">Browse packages and logs</a></div>
+    <div><a href="override">Discrepancies with unstable</a> and some <a href="explanations.txt">explanations</a></div>
+    <div><a href="missing.txt">Missing packages</a></div>
+    <div><a href="failures.txt">Commented failures</a></div>
+    <div><a href="testing.txt">TODO list for testing</a></div>
+    <div><a href="https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ocaml-4.13.1-transition;users=debian-ocaml-maint@lists.debian.org">Bugs</a></div>
+    <hr/>
+    <div style="float:left;">
+      <div><em>Last update: @Date@.</em></div>
+      <div><em>Page maintained by <a href="mailto:glondu@debian.org">Stéphane Glondu</a>.</em></div>
+    </div>
+    <div style="float:right;">
+      <a href="https://www.debian.org/"><img src="https://www.debian.org/Pics/openlogo-50.png" alt="Debian" style="border: none;" /></a>
+      <a href="https://ocaml.org/"><img src="https://ocaml.org/logo/Colour/PNG/colour-logo.png" alt="OCaml" style="border: none; width: 150px;" /></a>
+    </div>
+  </body>
+</html>
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/Makefile.pool 0.10.0/examples/ocaml-transition-scripts/lib/Makefile.pool
--- 0.9.2/examples/ocaml-transition-scripts/lib/Makefile.pool	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/Makefile.pool	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,25 @@
+# -*- makefile -*-
+
+OCAML_VERSION=$(patsubst ocaml-%,%,$(notdir $(abspath $(CURDIR)/..)))
+
+all: Release index
+
+stamp:
+	touch $@
+
+Packages: stamp
+	dpkg-scanpackages . > $@
+
+Sources: stamp
+	dpkg-scansources . > $@
+
+Release: Packages Sources
+	rm -f InRelease
+	apt-ftparchive -c apt-ftparchive.conf release . > $@
+
+index: Release
+	DATE=$$(sed -n 's/Date: //p' Release); \
+	sed \
+	  -e 's/@OCamlVersion@/$(OCAML_VERSION)/g' \
+	  -e "s/@Date@/$$DATE/g" \
+	  ../usr/lib/index.html.in > ../index.html
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/pbuilder-rebuild.sh 0.10.0/examples/ocaml-transition-scripts/lib/pbuilder-rebuild.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/pbuilder-rebuild.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/pbuilder-rebuild.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+set -e
+
+ARCH=amd64
+BASE=$1
+SUFFIX=$2
+PACKAGE=$3
+INTERACTIVE=$4
+OCAML_VERSION=${BASE##*-}
+
+su -c "mkdir /tmp/build" builder
+cd /tmp/build
+DSC=$BASE/override/${PACKAGE}_*.dsc
+if ! [ -f $DSC ]; then
+    su -c "apt-get -o 'APT::Get::Only-Source=true' source -d $PACKAGE" builder
+    DSC=*.dsc
+fi
+su -c "dpkg-source -x $DSC" builder
+cd $PACKAGE-*
+VERSION=$(dpkg-parsechangelog -S Version)
+
+cat > ../new-entry <<EOF
+$PACKAGE ($VERSION$SUFFIX) unstable-ocaml; urgency=medium
+
+  * Recompile with OCaml $OCAML_VERSION
+
+ -- Anonymous Builder <builder@example.org>  $(date -R)
+
+EOF
+
+cat ../new-entry debian/changelog > ../new-changelog
+su -c "cp ../new-changelog debian/changelog" builder
+rm -f ../new-entry ../new-changelog
+
+/usr/lib/pbuilder/pbuilder-satisfydepends
+
+if command -v ocamlc > /dev/null; then
+    if [ "$(ocamlc -version)" != "$OCAML_VERSION" ]; then
+        echo "Wrong OCaml version: $(ocamlc -version)"
+        exit 1
+    fi
+fi
+
+if su -c "dpkg-buildpackage -us -uc -sa" builder; then
+    dcmd cp ../*.changes $BASE/build/
+else
+    R=$?
+    if [ -n "$INTERACTIVE" ]; then
+        bash -i
+    fi
+    exit $R
+fi
diff -pruN 0.9.2/examples/ocaml-transition-scripts/lib/pbuilder-setup-chroot.sh 0.10.0/examples/ocaml-transition-scripts/lib/pbuilder-setup-chroot.sh
--- 0.9.2/examples/ocaml-transition-scripts/lib/pbuilder-setup-chroot.sh	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/lib/pbuilder-setup-chroot.sh	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+VERSION=$1
+REPO=$2
+
+useradd -s /bin/bash builder
+mkdir /home/builder
+chown builder:builder /home/builder
+
+apt-get install -y pbuilder mg less ncurses-term fakeroot devscripts
+
+cat > /etc/apt/sources.list <<EOF
+deb http://ftp.fr.debian.org/debian/ sid main contrib non-free
+deb-src http://ftp.fr.debian.org/debian/ sid main contrib non-free
+deb [trusted=yes] file://$REPO ./
+EOF
+
+cat > /etc/apt/preferences <<EOF
+Package: *
+Pin: release a=unstable-ocaml
+Pin-Priority: 1000
+EOF
diff -pruN 0.9.2/examples/ocaml-transition-scripts/README.md 0.10.0/examples/ocaml-transition-scripts/README.md
--- 0.9.2/examples/ocaml-transition-scripts/README.md	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/examples/ocaml-transition-scripts/README.md	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,83 @@
+OCaml transition scripts
+========================
+
+Introduction
+------------
+
+The goal is to build a new universe with a new version of OCaml.
+
+Warning: as chroots are involved, some parts of these scripts require
+sudo privileges. If you are uncomfortable with that, use a virtual
+machine.
+
+Dependencies
+------------
+
+    apt install sudo pbuilder devscripts ben
+
+Guide
+-----
+
+To start a new transition, run:
+
+    /full/path/to/bin/create-transition.sh $VERSION $BASEPATH
+
+where:
+
+ * `$VERSION` is the new version of OCaml
+ * `$BASEPATH` is the path to a directory dedicated to transitions.
+
+A subdirectory `ocaml-$VERSION` will be created in it, and everything
+will be done from this new directory which we will call `$BASE` in the
+following. A convenience symbolic link `usr` to `/full/path/to` will
+be made. A pbuilder chroot will be created in
+`build/ocaml-$VERSION.tgz`. The APT repository of the new universe
+will be progressively built in `pool`. The pbuilder chroot is set up
+to use (and prefer) it.
+
+Source packages are taken from unstable by default. To override that,
+put the source package in the `override` directory. Before a package
+is built, a new changelog entry is added and `+o1` is appended to the
+version.
+
+To initialize (or update) ben's working directory:
+
+    ( cd ben && rm -f ben.cache && ben download -c ../usr/ben/download.ben )
+
+To update the Release file of the new universe:
+
+    touch pool/stamp && make -C pool -f ../usr/lib/Makefile.pool
+
+To sign the Release file before exposing the repository to the world:
+
+    gpg --clearsign < pool/Release > pool/InRelease
+
+Note that this is not necessary for the chroot, it trusts the pool
+unconditionally which is fine as packages are generated locally.
+
+To update the chroot:
+
+    sudo usr/bin/update-chroot.sh
+
+To rebuild a specific package in the new universe:
+
+    sudo usr/bin/rebuild.sh $PACKAGE
+
+This will build the package in the chroot, and put the resulting
+.changes and related files in the `build` directory. Il will also save
+a log to `build/$PACKAGE.log`. To promote these files to the pool:
+
+    dcmd mv -i build/*.changes build/*.log pool
+
+To do a round of compilation of all possible packages:
+
+    ( cd ben && sudo ben rebuild ../usr/ben/rebuild.ben -o ../missing.txt )
+
+This may be very long! and can be interrupted cleanly by creating a
+file `build/stop`. An option `-j N` can be given to `ben rebuild` to
+allow parallelization with at most `N` simultaneous builds. You might
+want to restrict parallelization of the builds themselves with
+`OMP_THREAD_LIMIT=1` and/or `parallel=1` in `DEB_BUILD_OPTIONS`.
+
+Eventually, `missing.txt` will contain the list of failing packages and
+their failing dependencies, in Makefile syntax.
diff -pruN 0.9.2/examples/rebuild/ocaml.ben 0.10.0/examples/rebuild/ocaml.ben
--- 0.9.2/examples/rebuild/ocaml.ben	2018-05-21 13:54:04.000000000 +0000
+++ 0.10.0/examples/rebuild/ocaml.ben	2022-01-22 07:08:05.000000000 +0000
@@ -13,3 +13,7 @@ is_affected = .maintainer ~ /debian-ocam
 # In this example, always fail. This outputs the full dependency
 # graph.
 rebuild_command = "false";
+check_command = "false";
+stop_command = "false";
+promote_command = "true";
+update_command = "true";
diff -pruN 0.9.2/frontends/ben_monitor.ml 0.10.0/frontends/ben_monitor.ml
--- 0.9.2/frontends/ben_monitor.ml	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/frontends/ben_monitor.ml	2022-01-22 07:08:05.000000000 +0000
@@ -89,7 +89,7 @@ let format_arch x =
     else f
   in f
 
-let ben_webpage = "https://ben.debian.net"
+let ben_webpage = "https://debian.pages.debian.net/ben/"
 
 let print_dep_line fmt src deps =
   Format.fprintf fmt "%s:" !!!src;
diff -pruN 0.9.2/frontends/ben_rebuild.ml 0.10.0/frontends/ben_rebuild.ml
--- 0.9.2/frontends/ben_rebuild.ml	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/frontends/ben_rebuild.ml	2022-01-22 07:08:05.000000000 +0000
@@ -1,5 +1,5 @@
 (**************************************************************************)
-(*  Copyright © 2009-2017 Stéphane Glondu <steph@glondu.net>              *)
+(*  Copyright © 2009-2022 Stéphane Glondu <steph@glondu.net>              *)
 (*                                                                        *)
 (*  This program is free software: you can redistribute it and/or modify  *)
 (*  it under the terms of the GNU Affero General Public License as        *)
@@ -18,10 +18,14 @@
 (**************************************************************************)
 
 open Printf
+open Lwt.Syntax
 open Benl_core
 
+let ( let@ ) x f = x f
+
 let input_source = ref Benl_types.NoSource
 let output_file = ref None
+let nproc = ref 1
 
 let get_config config key =
   try StringMap.find key config
@@ -30,9 +34,14 @@ let get_config config key =
 let is_affected config =
   lazy (Query.of_expr (get_config config "is_affected"))
 
-let rebuild_command config =
-  let c = Benl_frontend.to_string "rebuild_command" (get_config config "rebuild_command") in
-  fun pkg -> Printf.ksprintf Sys.command "%s %s" c pkg = 0
+let run_command config name =
+  let c = Benl_frontend.to_string name (get_config config name) in
+  fun args ->
+  let args = Array.of_list (c :: args) in
+  let* r = Lwt_process.exec ~stdin:`Dev_null ~stdout:`Dev_null ~stderr:`Dev_null (c, args) in
+  match r with
+  | Unix.WEXITED i -> Lwt.return_some i
+  | _ -> Lwt.return_none
 
 open Benl_modules
 open Marshallable
@@ -54,6 +63,9 @@ let spec =
       "-o",
       Arg.String (fun x -> output_file := Some x),
       " Path to output file";
+      "-j",
+      Arg.Int (fun x -> nproc := x),
+      " Maximum number of jobs";
     ]
 
 let compute_graph data config =
@@ -69,29 +81,118 @@ let compute_graph data config =
   Dependencies.get_dep_graph sources src_of_bin
 
 let rebuild dep_graph config =
-  let rebuild_command = rebuild_command config in
-  let state = ref M.empty in
-  let rec build pkg =
-    match (try Some (M.find pkg !state) with Not_found -> None) with
-    | None ->
-       state := M.add pkg `Building !state;
-       if S.for_all build (M.find pkg dep_graph) then (
-         let b = rebuild_command !!!pkg in
-         state := M.add pkg (`Built b) !state;
-         b
-       ) else (
-         state := M.add pkg (`Built false) !state;
-         false
-       )
-    | Some `Building ->
-       ksprintf failwith "dependency cycle detected when building %s"
-         (Package.Name.to_string pkg)
-    | Some (`Built b) -> b
+  let pool = Lwt_pool.create !nproc Lwt.return in
+  let mutex = Lwt_mutex.create () in
+  let rebuild_command = run_command config "rebuild_command" in
+  let check_command = run_command config "check_command" in
+  let stop_command = run_command config "stop_command" in
+  let promote_command = run_command config "promote_command" in
+  let update_command = run_command config "update_command" in
+  let pkgs = M.bindings dep_graph |> List.map fst in
+  let* initial_state =
+    Lwt_list.fold_left_s (fun accu x ->
+        let* b = check_command [!!!x] in
+        match b with
+        | Some ((0 | 2) as i) -> Lwt.return (M.add x (`Built (i = 0)) accu)
+        | _ -> Lwt.return accu
+      ) M.empty pkgs
+  in
+  let state = ref initial_state in
+  let rec build closure pkg =
+    if S.mem pkg closure then (
+      (* dependency cycle detected *)
+      Lwt.return (`Built, false)
+    ) else (
+      match (try Some (M.find pkg !state) with Not_found -> None) with
+      | None ->
+         let t, u = Lwt.task () in
+         state := M.add pkg (`Building t) !state;
+         let* b =
+           let deps = M.find pkg dep_graph in
+           let* rs =
+             let closure = S.add pkg closure in
+             Lwt_list.map_p (fun x ->
+                 let* b = build closure x in
+                 Lwt.return (x, b)
+               ) (S.elements deps)
+           in
+           let successful = List.for_all (fun (_, (_, b)) -> b) rs in
+           let justbuilt =
+             List.filter_map
+               (function
+                | (pkg, (`JustBuilt, _)) -> Some pkg
+                | _ -> None
+               ) rs
+           in
+           let* justbuilt_processed =
+             if justbuilt <> [] then (
+               let@ () = Lwt_mutex.with_lock mutex in
+               let* update_needed =
+                 Lwt_list.fold_left_s (fun accu pkg ->
+                     let* r = promote_command [!!!pkg] in
+                     Lwt.return (accu || r <> Some 0)
+                   ) false justbuilt
+               in
+               if update_needed then (
+                 let* r = update_command [] in
+                 Lwt.return (r = Some 0)
+               ) else Lwt.return_true
+             ) else Lwt.return_true
+           in
+           if successful && justbuilt_processed then (
+             let@ () = Lwt_pool.use pool in
+             let@ () = fun cont ->
+               let* r = stop_command [] in
+               if r = Some 0 then Lwt.return (`Built, false)
+               else cont ()
+             in
+             let* () =
+               let open Lwt_io in
+               write_line stderr (Printf.sprintf "[BGN] %s" !!!pkg)
+             in
+             let* r = rebuild_command [!!!pkg] in
+             let* () =
+               let open Lwt_io in
+               let result = if r = Some 0 then "success" else "failure" in
+               write_line stderr (Printf.sprintf "[END] %s (%s)" !!!pkg result)
+             in
+             Lwt.return (`JustBuilt, r = Some 0)
+           ) else (
+             (* one of the dependencies failed *)
+             Lwt.return (`Built, false)
+           )
+         in
+         state := M.add pkg (`Built (snd b)) !state;
+         Lwt.wakeup_later u b;
+         Lwt.return b
+      | Some (`Building t) -> t
+      | Some (`Built b) -> Lwt.return (`Built, b)
+    )
+  in
+  let* rs =
+    Lwt_list.map_p (fun pkg ->
+        let* r = build S.empty pkg in
+        Lwt.return (pkg, r)
+      ) pkgs
+  in
+  let* needs_update =
+    Lwt_list.fold_left_s (fun accu (pkg, (r, _)) ->
+        match r with
+        | `JustBuilt ->
+           let* r = promote_command [!!!pkg] in
+           Lwt.return (accu || r <> Some 0)
+        | `Built -> Lwt.return accu
+      ) false rs
+  in
+  let* () =
+    if needs_update then (
+      let* _ = update_command [] in
+      Lwt.return_unit
+    ) else Lwt.return_unit
   in
-  M.iter (fun pkg _ -> ignore (build pkg)) dep_graph;
   let unsuccessful pkg =
     match M.find pkg !state with
-    | `Building -> assert false
+    | `Building _ -> assert false
     | `Built b -> not b
   in
   M.fold
@@ -101,6 +202,7 @@ let rebuild dep_graph config =
         M.add pkg deps accu
       ) else accu
     ) dep_graph M.empty
+  |> Lwt.return
 
 let print_dependency_levels oc dep_graph rounds =
   List.iter begin fun xs ->
@@ -111,7 +213,7 @@ let print_dependency_levels oc dep_graph
     end packages
   end rounds
 
-let main () =
+let lwt_main () =
   let config = match !input_source with
     | Benl_types.NoSource -> Benl_error.raise Benl_error.Missing_configuration_file
     | _ as source -> Benl_frontend.read_config ~multi:true source
@@ -122,14 +224,18 @@ let main () =
   in
   let data = Benl_data.load_cache archs_list in
   let dep_graph = compute_graph data config in
-  let dep_graph = rebuild dep_graph config in
+  let* dep_graph = rebuild dep_graph config in
   let rounds = Dependencies.topo_split dep_graph in
   let oc, close = match !output_file with
     | None -> stdout, fun () -> ()
     | Some x -> let oc = open_out x in oc, fun () -> close_out oc
   in
   print_dependency_levels oc dep_graph rounds;
-  close ()
+  close ();
+  Lwt.return_unit
+
+let main () =
+  Lwt_main.run (lwt_main ())
 
 let anon_fun file =
   if Benl_core.ends_with file ".ben" then
diff -pruN 0.9.2/.gitignore 0.10.0/.gitignore
--- 0.9.2/.gitignore	1970-01-01 00:00:00.000000000 +0000
+++ 0.10.0/.gitignore	2022-01-22 07:08:05.000000000 +0000
@@ -0,0 +1,6 @@
+_build
+ben
+*~
+modules.png
+doc/ben.1
+doc/refman.html
diff -pruN 0.9.2/Makefile 0.10.0/Makefile
--- 0.9.2/Makefile	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/Makefile	2022-01-22 07:08:05.000000000 +0000
@@ -24,7 +24,7 @@ PREFIX := /usr/local
 
 # Auto-detection
 ifeq ($(OCAMLBEST),)
-HAS_OPT := $(shell if which ocamlopt > /dev/null; then echo yes; fi)
+HAS_OPT := $(shell if command -v ocamlopt > /dev/null; then echo yes; fi)
 else ifeq ($(OCAMLBEST),native)
 HAS_OPT := yes
 else
diff -pruN 0.9.2/myocamlbuild.ml 0.10.0/myocamlbuild.ml
--- 0.9.2/myocamlbuild.ml	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/myocamlbuild.ml	2022-01-22 07:08:05.000000000 +0000
@@ -43,7 +43,7 @@ let build_date =
   with Not_found ->
     try_run "date +'%F %T %Z'"
 
-let has_ocamlopt = try_exec "which ocamlopt"
+let has_ocamlopt = try_exec "command -v ocamlopt"
 let best =
   try Sys.getenv "OCAMLBEST"
   with Not_found -> if has_ocamlopt then "native" else "byte"
diff -pruN 0.9.2/_tags 0.10.0/_tags
--- 0.9.2/_tags	2021-01-17 20:31:59.000000000 +0000
+++ 0.10.0/_tags	2022-01-22 07:08:05.000000000 +0000
@@ -1,4 +1,4 @@
-<{lib,bin,frontends}/*>: debug, thread, package(dynlink), package(unix), package(re.pcre), package(netstring), package(ocamlgraph), package(tyxml), package(fileutils), package(threads), package(postgresql), package(parmap), package(extlib)
+<{lib,bin,frontends}/*>: debug, thread, package(dynlink), package(unix), package(re.pcre), package(netstring), package(ocamlgraph), package(tyxml), package(fileutils), package(threads), package(postgresql), package(parmap), package(extlib), package(lwt.unix)
 <templates/*>: package(tyxml)
 <**/*.ml*>: annot
 <lib/benlib/*.cmx>: for-pack(Benlib)
