catalog

Resolve a list of Package Groups

Resolves a list of package groups, each being a list of package descriptors.

Required Body:

  • groups: An object with an items array of PackageGroups to resolve.

Optional Query Parameters:

  • none

Returns:

  • ResolvedPackageGroups: A object with an items array of ResolvedPackageGroup items.

Resolution Rules:

  • Each PackageGroup is resolved independently.
  • Each page that has a package that meets each of the descriptors in that group is returned in the results
  • The latest page will include details for each package in the group from that page
  • The remainder pages are returned without details (to get those details... TBD)

A Package Descriptor match:

  • name: [required] - is not used in matching, only for reference (TBD is there a uniqueness constraint?)
  • attr_path: [required] - this must match the nix attribute path exactly and in full
  • version: [optional] - Either a literal version to match or a semver constraint. This will be treated as a semver IFF TBD, otherwise it will be treated as a literal string match to the nix version field. If this is detected as a semver, packages whose version field cannot be parsed as a semver will be excluded.
  • allow_pre_release: [optional] - Defaults to False. Only applies when a semver constraint is given. If true, a version that can be parsed as a valid semver, that includes a pre-release suffix will be included as a candidate. Otherwise, they will be excluded.
  • allow_broken: [optional] - Defaults to False. A package marked as broken = True will be excluded unless this is set to True.
  • allow_unfree: [optional] - Defaults to True. A package marked as unfree = True will be excluded unless this is set to True.
  • allow_insecure: [optional] - Defaults to False. A package marked as insecure = True will be excluded unless this is set to True.
  • allow_missing_builds: [optional] - Defaults to False. A package is expected to have been built if it is not marked as broken, unfree, or insecure. A package that is expected to have been built, but none of it's outputs have been observed to build, will attempt to be excluded unless this is set to True. This constraint may be softened if the group can not be resolved with it enforced. If this occurs, the ressponse will note this by including a warning level message.
post/api/v1/catalog/resolve

Query parameters

candidate_pagesinteger

Request body

Example request

{
  "items": [
    {
      "descriptors": [
        {
          "attr_path": "curl",
          "install_id": "curl",
          "systems": [
            "x86_64-linux"
          ]
        },
        {
          "attr_path": "slack",
          "install_id": "slack",
          "systems": [
            "x86_64-linux"
          ]
        },
        {
          "attr_path": "xorg.xeyes",
          "install_id": "xeyes",
          "systems": [
            "x86_64-linux"
          ]
        }
      ],
      "name": "test"
    }
  ]
}

Response

A list of resolved package groups

Example response

{
  "items": [
    {
      "attr_path": "foo.bar.curl",
      "description": "A very nice Item",
      "license": "foo",
      "locked_url": "git:git?rev=xyz",
      "name": "curl",
      "outputs": "{}",
      "outputs_to_install": "{}",
      "pkg_path": "foo.bar.curl",
      "pname": "curl",
      "rev": "xyz",
      "rev_count": 4,
      "rev_date": 0,
      "stabilities": [
        "stable",
        "unstable"
      ],
      "system": "x86_64-linux",
      "version": "1.0"
    }
  ]
}

Changes