aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-11-03 15:27:47 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-11-03 15:27:47 +0000
commitbf0a9ecab1d263632605a25671381a1951965d28 (patch)
tree2dc0fd481827b64bfcf1aaea081de8ba52316d14
parentc681ba43865c92dd7bc2f08908dc077c28d49504 (diff)
downloadpaludis-bf0a9ecab1d263632605a25671381a1951965d28.tar.gz
paludis-bf0a9ecab1d263632605a25671381a1951965d28.tar.xz
Explain EUSER better for paludis -i foo::/
-rw-r--r--doc/faq/index.html.part2
-rw-r--r--doc/faq/operation.html.part8
-rw-r--r--paludis/install_task.cc17
3 files changed, 27 insertions, 0 deletions
diff --git a/doc/faq/index.html.part b/doc/faq/index.html.part
index ab270d7..2b43a09 100644
--- a/doc/faq/index.html.part
+++ b/doc/faq/index.html.part
@@ -44,6 +44,8 @@ functionality. Pestering anyone about these is liable to get you hurt a lot.</p>
<li><a href="operation.html#info">Get package information for a bug report</a></li>
<li><a href="operation.html#arrows">What do those fancy arrows when merging things mean?</a></li>
<li><a href="operation.html#updates">Profiles Updates for Package Moves and Slot Moves</a></li>
+ <li><a href="operation.html#repospecs">I can't install <code>*/*::installed</code> or
+ <code>*/*::overlay-&gt;</code></a></li>
</ul>
<h2>Stricter than Portage</h2>
diff --git a/doc/faq/operation.html.part b/doc/faq/operation.html.part
index b408f6f..7cd6089 100644
--- a/doc/faq/operation.html.part
+++ b/doc/faq/operation.html.part
@@ -8,6 +8,8 @@
<li><a href="operation.html#info">Get package information for a bug report</a></li>
<li><a href="operation.html#arrows">What do those fancy arrows when merging things mean?</a></li>
<li><a href="operation.html#updates">Profiles Updates for Package Moves and Slot Moves</a></li>
+ <li><a href="operation.html#repospecs">I can't install <code>*/*::installed</code> or
+ <code>*/*::overlay-&gt;</code></a></li>
</ul>
<h2 id="updatingdepends">Paludis does not update DEPENDs of already installed packages</h2>
@@ -99,3 +101,9 @@ variable to <code>yes</code> and then sync to perform updates.</p>
the update. In this situation, you should generally manually uninstall the older of <code>foo</code> or
<code>bar</code>.</p>
+<h2 id="repospecs">I can't install <code>*/*::installed</code> or <code>*/*::overlay-&gt;</code></h2>
+
+<p>You can't install (or reinstall) a package ID that is already installed. The <code>foo/bar-1.23</code> you have
+installed has absolutely nothing whatsoever to do with any other <code>foo/bar-1.23</code>, and by specifying
+<code>::installed</code> or <code>::overlay-&gt;</code> you are specifically saying "give me the installed ID".</p>
+
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 25251fd..91166af 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -468,6 +468,23 @@ InstallTask::_add_target(const std::string & target)
_imp->env, UserPackageDepSpecOptions() + updso_throw_if_set + updso_allow_wildcards,
filter::SupportsAction<InstallAction>())));
+ bool spec_is_installed(false);
+
+ if (spec->in_repository_ptr() &&
+ _imp->env->package_database()->has_repository_named(*spec->in_repository_ptr()) &&
+ _imp->env->package_database()->fetch_repository(*spec->in_repository_ptr())->installed_root_key())
+ spec_is_installed = true;
+ else if (spec->from_repository_ptr())
+ spec_is_installed = true;
+ else if (spec->installed_at_path_ptr())
+ spec_is_installed = true;
+
+ if (spec_is_installed)
+ Log::get_instance()->message("install_task.installed_spec", ll_warning, lc_context)
+ << "Target '" << target << "' appears to make use of ::repository restrictions "
+ << "that restrict to an installed repository. This probably does not do what you "
+ << "think it does. Consult the FAQ for an explanation";
+
if (_imp->had_set_targets)
throw HadBothPackageAndSetTargets();
_imp->had_package_targets = true;