aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-drop.cli
blob: 75ee04d57d35837b77f87ad8611d58bfeea669c7 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// file      : bpkg/pkg-drop.cli
// license   : MIT; see accompanying LICENSE file

include <bpkg/configuration.cli>;

"\section=1"
"\name=bpkg-pkg-drop"
"\summary=drop package"

namespace bpkg
{
  {
    "<options>",

    "\h|SYNOPSIS|

     \c{\b{bpkg pkg-drop}|\b{drop} [<options>] <pkg>...\n
        \b{bpkg pkg-drop}|\b{drop} [<options>] \b{--all}|\b{-a}\n
        \b{bpkg pkg-drop}|\b{drop} [<options>] (\b{--all-pattern} <pattern>)...}

     \h|DESCRIPTION|

     The \cb{pkg-drop} command drops from the configuration the specified
     packages (the first form), all the held packages (the second form, see
     \l{bpkg-pkg-status(1)}), or all the held packages that match any of the
     specified wildcard patterns (the third form). If the packages being
     dropped still have dependent packages, then those will have to be dropped
     as well and you will be prompted to confirm. And if the packages being
     dropped have dependency packages that would otherwise no longer be used,
     then they will be dropped as well unless the \c{\b{--keep-unused}|\b{-K}}
     option is specified.

     The \cb{pkg-drop} command also supports several options (described below)
     that allow you to control the amount of work that will be done."
  }

  class pkg_drop_options: configuration_options
  {
    "\h|PKG-DROP OPTIONS|"

    bool --all|-a
    {
      "Drop all held packages."
    }

    strings --all-pattern
    {
      "<pattern>",
      "Drop held packages that match the specified wildcard pattern. Repeat
       this option to match multiple patterns. Note that you may need to quote
       the pattern to prevent expansion by your shell."
    }

    bool --yes|-y
    {
      "Assume the answer to all prompts is \cb{yes}. Note that this option
       does not apply to the dropping of dependents; use \cb{--drop-dependent}
       for that."
    }

    bool --no|-n
    {
      "Assume the answer to all prompts is \cb{no}. Only makes sense together
       with \cb{--print-only|-p}."
    }

    bool --keep-unused|-K
    {
      "Don't drop dependency packages that were automatically built but will no
       longer be used."
    }

    bool --drop-dependent|-D
    {
      "Don't warn about or ask for confirmation if dropping dependent
       packages."
    }

    bool --keep-dependent
    {
      "Issue an error if attempting to drop dependent packages."
    }

    uint16_t --dependent-exit
    {
      "<code>",
      "Silently exit with the specified error code if attempting to drop
       dependent packages."
    }

    bool --disfigure-only
    {
      "Disfigure all the packages but don't purge."
    }

    bool --print-only|-p
    {
      "Print to \cb{stdout} what would be done without actually doing
       anything."
    }

    string --plan
    {
      "<header>",
      "Print the plan (even if \cb{--yes} is specified) and start it with the
       <header> line (unless it is empty)."
    };
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bpkg-default-options-files(1)} for an overview of the default
   options files. For the \cb{pkg-drop} command the search start
   directory is the configuration directory. The following options files are
   searched for in each directory and, if found, loaded in the order listed:

   \
   bpkg.options
   bpkg-pkg-drop.options
   \

   The following \cb{pkg-drop} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}