diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-21 06:32:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-21 06:32:56 +0200 |
commit | df91839a0f53b1bf266eb6b9ebabf2b587211731 (patch) | |
tree | 54be65ac5da79d560d5186491e806f8fc9d44323 /bpkg/system-package-manager-debian.cxx | |
parent | d76e64d064c859e8a9cb69640bdb099427aca7b7 (diff) |
Add support for --recursive=separate pkg-bindist option mode
Diffstat (limited to 'bpkg/system-package-manager-debian.cxx')
-rw-r--r-- | bpkg/system-package-manager-debian.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx index f0a34a4..2f11701 100644 --- a/bpkg/system-package-manager-debian.cxx +++ b/bpkg/system-package-manager-debian.cxx @@ -1915,7 +1915,8 @@ namespace bpkg const package_manifest& pm, const string& pt, const small_vector<language, 1>& langs, - optional<recursive_mode> recur) + optional<bool> recursive_full, + bool first) { tracer trace ("system_package_manager_debian::generate"); @@ -2112,9 +2113,7 @@ namespace bpkg // since we know dependencies cannot be spread over multiple linked // configurations. // - string scope (!recur || *recur == recursive_mode::full - ? "project" - : "weak"); + string scope (!recursive_full || *recursive_full ? "project" : "weak"); // Get the map of files that will end up in the binary packages. // @@ -2148,16 +2147,13 @@ namespace bpkg // Also, by default, we are going to keep all the intermediate files on // failure for troubleshooting. // - if (exists (out)) + if (first && exists (out) && !empty (out)) { - if (!empty (out)) - { - if (!ops_->wipe_output ()) - fail << "output root directory " << out << " is not empty" << - info << "use --wipe-output to clean it up but be careful"; + if (!ops_->wipe_output ()) + fail << "output root directory " << out << " is not empty" << + info << "use --wipe-output to clean it up but be careful"; - rm_r (out, false); - } + rm_r (out, false); } // Normally the source directory is called <name>-<upstream-version> |