aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-status-options.cli
blob: dbc040ae11e0c3a0b72b5b61b7a195b2ae313861 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// file      : bpkg/pkg-status-options.cli
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

include <bpkg/configuration-options.cli>;

"\section=1"
"\name=bpkg-pkg-status"
"\summary=print package status"

"\project=bpkg"          //@@ command line
"\version=0.1.0"         //@@ command line
"\date=12 November 2015" //@@ command line; release date

{
"<options> <pkg> <ver>",

"\h|SYNOPSIS|

\c{\b{bpkg pkg-status} [<options>] <pkg>[/<ver>]}

\h|DESCRIPTION|

The \cb{pkg-status} command prints the status of the specified package or, if
<ver> is specified, package version. Note that the status is written to
\cb{STDOUT}, not \cb{STDERR}.

The status format is regular. First always comes one of the following status
words:

\dl|

\li|\cb{unknown}

    package is not part of the configuration nor available in one of the
    repositories|

\li|\cb{available}

    package is not part of the configuration but is available in one of the
    repositories|

\li|\cb{fetched}

    package is part of the configuration and is fetched|

\li|\cb{unpacked}

    package is part of the configuration and is unpacked|

\li|\cb{configured}

    package is part of the configuration and is configured||


If only the package name was specified without the package version, then the
\cb{available} status word is followed by the list of available versions.

Similarly, if only the package name was specified, then the \cb{fetched},
\cb{unpacked}, and \cb{configured} status words are followed by the version
of the package. After the possible package version, these status words may
be followed by one or more sub-status words. Currently, these can be
\cb{hold_package} (package should not be automatically dropped) and
\cb{hold_version} (package should not be automatically upgraded). Finally,
if only the package name was specified and newer versions are available
in the repositories, then the sub-status words are followed by '\cb{;}',
the \cb{available} status word, and the list of newer versions.

Below are some examples, assuming the configuration has libfoo 1.0.0
configured and held as well as libfoo 1.1.0 and 1.1.1 available from a
repository.

\
bpkg pkg-status libbar
unknown

bpkg pkg-status libbar/1.0.0
unknown

bpkg pkg-status libfoo/1.0.0
configured hold_package

bpkg pkg-status libfoo/1.1.0
available

bpkg pkg-status libfoo
configured 1.0.0 hold_package; available 1.1.0 1.1.1
\

Assuming now that we dropped libfoo from the configuration:

\
bpkg pkg-status libfoo/1.0.0
unknown

bpkg pkg-status libfoo/1.1.0
available

bpkg pkg-status libfoo
available 1.1.0 1.1.1
\

\h|OPTIONS|"
}

namespace bpkg
{
  class pkg_status_options: configuration_options
  {
  };
}