aboutsummaryrefslogtreecommitdiff
path: root/paludis/fs_merger.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-01-14 21:27:47 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-01-14 21:33:27 +0000
commit95bd57bb886a5673bd690760b0041f70e1c11b11 (patch)
tree43fa58145a65d5b4bc3d3c9d1ea392e0e4bb90ce /paludis/fs_merger.cc
parent77cd8163e95257f9aaf4fc40aa3ea5c42bc6cd26 (diff)
downloadpaludis-95bd57bb886a5673bd690760b0041f70e1c11b11.tar.gz
paludis-95bd57bb886a5673bd690760b0041f70e1c11b11.tar.xz
Allow some FSMerger warnings to be fatal
Diffstat (limited to 'paludis/fs_merger.cc')
-rw-r--r--paludis/fs_merger.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/paludis/fs_merger.cc b/paludis/fs_merger.cc
index 883e4ea7d..7d3011665 100644
--- a/paludis/fs_merger.cc
+++ b/paludis/fs_merger.cc
@@ -234,8 +234,13 @@ FSMerger::on_dir_over_sym(bool is_check, const FSPath & src, const FSPath & dst)
if (m == et_dir)
{
- on_warn(is_check, "Expected '" + stringify(dst / src.basename()) +
- "' to be a directory but found a symlink to a directory");
+ if (_imp->params.fs_merger_options()[fsmo_dir_over_sym_dir_is_error])
+ on_error(is_check, "Expected '" + stringify(dst / src.basename()) +
+ "' to be a directory but found a symlink to a directory");
+ else
+ on_warn(is_check, "Expected '" + stringify(dst / src.basename()) +
+ "' to be a directory but found a symlink to a directory");
+
if (! is_check)
track_install_dir(src, dst, FSMergerStatusFlags() + msi_used_existing);
}