aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-build.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-22 10:57:35 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-04-19 19:39:55 +0300
commit46842f6cf74d085ced382dd0c187f6a7a578913c (patch)
treecff252bad3d41366d6b06d2f60e6f6d4ab4747fe /bpkg/pkg-build.cxx
parent33e31295462764ff2d95c361e877a460026efbf0 (diff)
Update pkg-build documentation
Diffstat (limited to 'bpkg/pkg-build.cxx')
-rw-r--r--bpkg/pkg-build.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx
index b884fba..4b703b4 100644
--- a/bpkg/pkg-build.cxx
+++ b/bpkg/pkg-build.cxx
@@ -1186,6 +1186,16 @@ namespace bpkg
const dir_path& c (o.directory ());
l4 ([&]{trace << "configuration: " << c;});
+ // The --immediate or --recursive option can only be specified with an
+ // explicit --upgrade or --patch.
+ //
+ if (const char* n = (o.immediate () ? "--immediate" :
+ o.recursive () ? "--recursive" : nullptr))
+ {
+ if (!o.upgrade () && !o.patch ())
+ fail << n << " requires explicit --upgrade|-u or --patch|-p";
+ }
+
if (o.drop_prerequisite () && o.keep_prerequisite ())
fail << "both --drop-prerequisite|-D and --keep-prerequisite|-K "
<< "specified" <<
@@ -2043,7 +2053,7 @@ namespace bpkg
// Almost forgot, there is one more thing: when we upgrade or downgrade a
// package, it may change the list of its prerequisites. Which means we
// may end up with packages that are no longer necessary and it would be
- // nice to offer to drop those. This, howeve, is a tricky business and is
+ // nice to offer to drop those. This, however, is a tricky business and is
// the domain of pkg_drop(). For example, a prerequisite may still have
// other dependents (so it looks like we shouldn't be dropping it) but
// they are all from the "drop set" (so we should offer to drop it after