aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-fetch-options.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-10-10 08:12:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-10-10 08:12:50 +0200
commit4e3faacbc3c27e1d01ca95697b34db82cdecdb9d (patch)
tree5144d4bddbb376318fcaf20dafa0c391ddce93b1 /bpkg/pkg-fetch-options.cli
parent803acc23f8cea3079681e9e624702e104adfd775 (diff)
Implement --replace|-r mode for pkg-fetch
Diffstat (limited to 'bpkg/pkg-fetch-options.cli')
-rw-r--r--bpkg/pkg-fetch-options.cli22
1 files changed, 16 insertions, 6 deletions
diff --git a/bpkg/pkg-fetch-options.cli b/bpkg/pkg-fetch-options.cli
index afd75fb..4cfeb35 100644
--- a/bpkg/pkg-fetch-options.cli
+++ b/bpkg/pkg-fetch-options.cli
@@ -16,12 +16,17 @@ bpkg pkg-fetch [<options>] (<pkg>/<ver>)|(-e <file>)"
The \cb{pkg-fetch} command fetches the archive for the specified package
name and version from one of the configuration's repositories. If the
-\cb{-e|--existing} option is used, then instead of the name and version
-argument, \cb{pkg-fetch} expects a local path to the existing package
-archive. In this case, \cb{bpkg} will use the archive in place, without
-copying it to the configuration or package cache directories. Also,
-unless the \cb{-p|--purge} option is specified, \cb{bpkg} will not
-attempt to remove the archive when the package is purged with the
+\cb{-r|--replace} option is specified, then \cb{pkg-fetch} will replace the
+archive of a package that is already in the \cb{fetched} state. Otherwise,
+\cb{pkg-fetch} expects the package to not exist in the configuration's
+database.
+
+If the \cb{-e|--existing} option is used, then instead of the name and
+version argument, \cb{pkg-fetch} expects a local path to the existing
+package archive. In this case, \cb{bpkg} will use the archive in place,
+without copying it to the configuration or package cache directories.
+Also, unless the \cb{-p|--purge} option is specified, \cb{bpkg} will
+not attempt to remove the archive when the package is purged with the
\cb{pkg-purge} command."
*/
@@ -29,6 +34,11 @@ namespace bpkg
{
class pkg_fetch_options: configuration_options
{
+ bool --replace|-r
+ {
+ "Replace the archive if the package is already fetched."
+ };
+
bool --existing|-e
{
"Treat the argument as an existing package archive path rather than