aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-15 12:42:11 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-15 12:42:11 +0100
commit68d8d9395d2c53238a087413619039342cbf15c9 (patch)
tree2e12c3ba3e4eef1c49cd89c0e1943ddb6c00c66a
parentdefd17a66b3af79ca09d00510c7265993b1728e1 (diff)
downloadpaludis-68d8d9395d2c53238a087413619039342cbf15c9.tar.gz
paludis-68d8d9395d2c53238a087413619039342cbf15c9.tar.xz
Warn if fix-linkage --library is given a /path
-rw-r--r--src/clients/cave/cmd_fix_linkage.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/clients/cave/cmd_fix_linkage.cc b/src/clients/cave/cmd_fix_linkage.cc
index af28ee3..b690b1d 100644
--- a/src/clients/cave/cmd_fix_linkage.cc
+++ b/src/clients/cave/cmd_fix_linkage.cc
@@ -28,6 +28,7 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/create_iterator-impl.hh>
+#include <paludis/util/log.hh>
#include <paludis/broken_linkage_finder.hh>
#include <paludis/package_id.hh>
#include <paludis/name.hh>
@@ -164,8 +165,16 @@ FixLinkageCommand::run(
resolve_cmdline.resolution_options.a_execute.set_specified(true);
auto libraries(std::make_shared<Sequence<std::string>>());
- std::copy(cmdline.a_libraries.begin_args(), cmdline.a_libraries.end_args(),
- std::back_inserter(*libraries));
+ for (auto l(cmdline.a_libraries.begin_args()), l_end(cmdline.a_libraries.end_args()) ;
+ l != l_end ; ++l)
+ {
+ libraries->push_back(*l);
+ if (std::string::npos != l->find('/'))
+ Log::get_instance()->message("cave.fix_linkage.library_path", ll_warning, lc_no_context)
+ << "Argument --" << cmdline.a_libraries.long_name() << " '" << *l << "' includes a '/', which "
+ "probably does not do what you want. Generally you should not specify a path to a library.";
+ }
+
std::shared_ptr<BrokenLinkageFinder> finder;
{
DisplayCallback display_callback("Searching: ");