Proposal for the next generation of edos-debcheck

This is a proposal for the user interface of the edos-debchcek that will be based on the dose3 library.

Usage -- proposal for a manpage

edos-debcheck [option] ... [filename] ...

Checks whether all members of a set of packages, each of which is described by a deb-control(5) stanza, are installable from the point of view of inter-package relations expressed in the package stanzas. A package may be either in the foreground (in which case the tool checks installability of that package, and may also use it to satisfy the dependencies of other packages), or in the background (in which case the tool does not check installability of that package but may use it to satisfy dependencies of other packages).

The contents of the files listed on the command line constitutes the set of foreground packages, "-" indicates that in addition foreground package stanzas are to be read from standard input. Without any additional options, the set of background packages is empty. Packages may be pushed from the foreground into the background by using filter options (see "input options" below).

By default, only the number of non-installable foreground packages is displayed, see "output options" below for how to change this.

Options and filenames can be given in any order. In any case, any option applies to the complete problem instance.

Input Options

-b, --background <file>

-m, --match <filterexpression>

Output Options

-f, --failures

-s, --successes

-e, --explain

-q, --quiet

-v, --verbose

Misc Options

-h, --help

--version

Remarks on Usage

Output Format

We intend to drop the currently optional XML output, and have one single YAML output format which is both user readable and machine parsable.

The possible errors are conflicts, dependencies and missing packages the vpkg is the dependency as it is reported in the control stanza, the "packages" are the result of the expansion of the vpkg in the current universe. For example, below the package x has a dependency problem related to packages b = 1 and b = 2 , and a conflict problem between packages b = 1 and c = 1 ... I made this up just to explain the format.

YAML Scheme

type: map
mapping:
  "total-packages": { type: int, required: true }
  "broken-packages": { type: int, required: true }
  "distribution": { type: text }
  "release": { type: text }
  "architecture": { type: text }
  "report":
    type: seq
    sequence:
      - type: map
        mapping:
          "package": { type: str, required: true }
          "version": { type: text, required: true }
          "architecture": { type: text, required: false }
          "source": { type: text, required: false }
          "status":  { type: str, enum: [ broken, ok ], required: true }
          "installationset":
             type: seq
             sequence:
               - type: map
                 mapping:
                   "package": { type: str, required: true }
                   "version": { type: text, required: true }
                   "architecture": { type: text, required: false }
          "reasons":
             type: seq
             sequence:
               - type: map
                 mapping:
                   "conflict":
                      type: map
                      mapping:
                        "pkg1":
                          type: map
                          required: true
                          mapping:
                            "package": { type: str, required: true }
                            "version": { type: text, required: true }
                            "architecture": { type: text, required: false }
                        "pkg2":
                          type: map
                          required: true
                          mapping:
                            "package": { type: str, required: true }
                            "version": { type: text, required: true }
                            "architecture": { type: text, required: false }
                        "depchain1":
                          type: seq
                          sequence:
                            - type: map
                              mapping:
                                "depchain":
                                  type: seq
                                  sequence:
                                    - type: map
                                      mapping:
                                        "package": { type: str, required: true }
                                        "version": { type: text, required: true }
                                        "architecture": { type: text, required: false }
                                        "depends": { type: str, required: false}
                        "depchain2":
                          type: seq
                          sequence:
                            - type: map
                              mapping:
                                "depchain":
                                  type: seq
                                  sequence:
                                    - type: map
                                      mapping:
                                        "package": { type: str, required: true }
                                        "version": { type: text, required: true }
                                        "architecture": { type: text, required: false }
                                        "depends": { type: str, required: false}
                   "missing":
                      type: map
                      mapping:
                        "pkg":
                          type: map
                          required: true
                          mapping:
                            "package": { type: str, required: true }
                            "version": { type: text, required: true }
                            "architecture": { type: text, required: false }
                            "missingdep": { type: str, required: false}
                        "depchains":
                          type: seq
                          sequence:
                            - type: map
                              mapping:
                                "depchain":
                                  type: seq
                                  sequence:
                                    - type: map
                                      mapping:
                                        "package": { type: str, required: true }
                                        "version": { type: text, required: true }
                                        "architecture": { type: text, required: false }
                                        "depends": { type: str, required: false}

There are two possible source of un-installability for a package. Either one package is missing or there is a conflict between two packages on which the root package depends (directly or indirectly). In both cases distcheck print a dependency path from the root to the offending packages.

Example of output

report:
 -
  package: knights-themepack
  version: 0.5.9-1
  architecture: amd64
  source: knights-themepack (= 0.5.9-1)
  status: broken
  reasons:
   -
    missing:
     pkg:
      package: knights
      version: 0.6-8.2+b1
      architecture: amd64
      missingdep: kdebase-kio-plugins
     paths:
      -
       depchain:
        -
         package: knights-themepack
         version: 0.5.9-1
         architecture: amd64
         depends: knights
 -
  package: xserver-xorg-input-fpit
  version: 1:1.3.0-2
  architecture: amd64
  source: xserver-xorg-input-fpit (= 1:1.3.0-2)
  status: broken
  reasons:
   -
    conflict:
     pkg1:
      package: xserver-xorg-input-fpit
      version: 1:1.3.0-2
      architecture: amd64
     pkg2:
      package: xserver-xorg-core
      version: 2:1.7.7-5
      architecture: amd64
     paths2:
      -
       depchain:
        -
         package: xserver-xorg-input-fpit
         version: 1:1.3.0-2
         architecture: amd64
         depends: xserver-xorg-core (>= 2:1.5.99.901)

total-packages: 29589
broken-packages: 143

to check the conformity of the example to the data structure we can use kwalify : http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html#schema

$kwalify -lf distcheck.yaml ex.yaml 
ex.yaml#0: valid.

EDOS-builddebcheck

This is almost as debcheck, except that filename arguments on the command line would indicate files containing source stanzas (which are foregound), and -i would be used for files containing binary packages (which are background).