diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-06 08:48:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-03-06 08:48:59 +0200 |
commit | d7014bd5a0bc3c09d175140641d1d8ad95e27559 (patch) | |
tree | 195db0cda3ac8d0e3067223472b6f7a3a5017854 /bpkg/system-package-manager-debian.cxx | |
parent | c84c3bda276e6b07ab784521de2634376286e76d (diff) |
Change <out-dir> argument to --output-root|-o option
Diffstat (limited to 'bpkg/system-package-manager-debian.cxx')
-rw-r--r-- | bpkg/system-package-manager-debian.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx index a3f2721..f012d6c 100644 --- a/bpkg/system-package-manager-debian.cxx +++ b/bpkg/system-package-manager-debian.cxx @@ -1856,13 +1856,20 @@ namespace bpkg const package_manifest& pm, const string& pt, const small_vector<language, 1>& langs, - const dir_path& out, optional<recursive_mode> recur) { tracer trace ("system_package_manager_debian::generate"); assert (!langs.empty ()); // Should be effective. + // We require explicit output root. + // + if (!ops_->output_root_specified ()) + fail << "output root directory must be specified explicitly with " + << "--output-root|-o"; + + const dir_path& out (ops_->output_root ()); // Cannot be empty. + const shared_ptr<selected_package>& sp (pkgs.front ().selected); const package_name& pn (sp->name); const version& pv (sp->version); @@ -2082,9 +2089,9 @@ namespace bpkg { if (!empty (out)) { - if (!ops_->wipe_out ()) - fail << "directory " << out << " is not empty" << - info << "use --wipe-out 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); } @@ -3179,7 +3186,7 @@ namespace bpkg // Cleanup intermediate files unless requested not to. // - if (!ops_->keep_out ()) + if (!ops_->keep_output ()) { rm_r (src); } |