aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/pkg-bindist.cli6
-rw-r--r--bpkg/pkg-bindist.cxx8
2 files changed, 8 insertions, 6 deletions
diff --git a/bpkg/pkg-bindist.cli b/bpkg/pkg-bindist.cli
index 2f30f6c..59a98f7 100644
--- a/bpkg/pkg-bindist.cli
+++ b/bpkg/pkg-bindist.cli
@@ -94,14 +94,16 @@ namespace bpkg
If unspecified, the host architecture is used."
}
- string --recursive
+ string --recursive = "none"
{
"<mode>",
"Bundle or generate dependencies of the specified packages. The <mode>
value can be either \cb{auto}, in which case only the required files
from each dependency package are bundled, \cb{full}, in which case
all the files are bundled, or \cb{separate}, in which case a separate
- binary package is generated for each non-system dependency.
+ binary package is generated for each non-system dependency. It can
+ also be \cb{none} which is equivalent to not specifying this option
+ (primarily useful for overriding a previously-specified value).
Specifically, in the \cb{auto} mode any required files, such as shared
libraries, are pulled implicitly by the \cb{install} build system
diff --git a/bpkg/pkg-bindist.cxx b/bpkg/pkg-bindist.cxx
index 5127f7e..4639746 100644
--- a/bpkg/pkg-bindist.cxx
+++ b/bpkg/pkg-bindist.cxx
@@ -237,7 +237,7 @@ namespace bpkg
if (m == "auto") rec = recursive_mode::auto_;
else if (m == "full") rec = recursive_mode::full;
else if (m == "separate") rec = recursive_mode::separate;
- else
+ else if (m != "none")
dr << fail << "unknown --recursive mode '" << m << "'";
}
@@ -579,9 +579,9 @@ namespace bpkg
{
json::stream_serializer s (cout);
- auto member = [&s] (const char* n, const string& v)
+ auto member = [&s] (const char* n, const string& v, const char* d = "")
{
- if (!v.empty ())
+ if (v != d)
s.member (n, v);
};
@@ -641,7 +641,7 @@ namespace bpkg
}
s.end_object (); // os_release
- member ("recursive", o.recursive ());
+ member ("recursive", o.recursive (), "none");
if (o.private_ ()) s.member ("private", true);
if (dependent_config) s.member ("dependent_config", true);