aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-verify.cli
blob: 33593e473bf648e3c55951c12ce371cc91f10233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// file      : bpkg/pkg-verify.cli
// license   : MIT; see accompanying LICENSE file

include <bpkg/common.cli>;

"\section=1"
"\name=bpkg-pkg-verify"
"\summary=verify package archive"

namespace bpkg
{
  {
    "<options> <file>",

    "\h|SYNOPSIS|

     \c{\b{bpkg pkg-verify} [<options>] <file>}

     \h|DESCRIPTION|

     The \cb{pkg-verify} command verifies that the specified archive file is a
     valid \cb{bpkg} package. Specifically, it checks that the file's name and
     the top-level directory inside the archive match the canonical
     \c{\i{name}\b{-}\i{version}} form and that there is a valid manifest file
     in that top-level directory. Additionally, if the \cb{--deep} option is
     specified, it also checks that the files referenced by the \cb{*-file}
     manifest values are present in the archive and are not empty."
  }

  class pkg_verify_options: common_options
  {
    "\h|PKG-VERIFY OPTIONS|"

    bool --silent
    {
      "Suppress the error messages about the reason why the package is
       invalid. Just return the error status."
    }

    bool --deep
    {
      "Verify files referenced by the \cb{*-file} manifest values."
    }

    bool --ignore-unknown
    {
      "Ignore unknown manifest entries. By default, \cb{bpkg} will refuse to
       declare such a package valid since it cannot be sure the unknown entries
       are valid."
    }

    bool --manifest
    {
      "Instead of printing the successful verification result in the
       human-readable form, dump the package manifest to \cb{stdout}. If the
       \cb{--deep} option is specified, then in the resulting manifest the
       \cb{*-file} values are replaced with the contents of the referenced
       files and the package dependency constraints are completed."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{pkg-verify} command the following options files
   are searched for in the predefined directories (system, etc) and, if found,
   loaded in the order listed:

   \
   bpkg.options
   bpkg-pkg-verify.options
   \
  "
}