aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-04-21 10:09:42 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-04-21 10:09:42 +0000
commitf4e46e016ae53de0699aff46f961e254c9fbafc5 (patch)
tree62e4cb44c3edf60ad9be637cf6132ea2f484eca8
parente07ab0f6659ba3de1338df5c63fc4d231dd85eca (diff)
downloadpaludis-f4e46e016ae53de0699aff46f961e254c9fbafc5.tar.gz
paludis-f4e46e016ae53de0699aff46f961e254c9fbafc5.tar.xz
Remove "ununused" set, make importare use the world file as usual, and make the resolver cope with the lack of installable versions.
-rw-r--r--NEWS5
-rw-r--r--doc/configuration/sets.html.part.in4
-rw-r--r--paludis/dep_list.cc10
-rw-r--r--paludis/environment_implementation.cc3
-rw-r--r--paludis/install_task.cc2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc3
-rw-r--r--paludis/uninstall_list.cc12
-rw-r--r--src/clients/importare/command_line.cc2
-rw-r--r--src/output/console_install_task.cc2
9 files changed, 21 insertions, 22 deletions
diff --git a/NEWS b/NEWS
index e0631fa..482e1c2 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ trunk/:
* env->query_use(...) now issues a QA notice and returns false for E
repository IDs when the flag isn't in IUSE / USE_EXPAND / arch.list.
+ * importare now adds packages to the world file unless the --preserve-world
+ option is specified; any packages previously installed with importare
+ should be added manually if appropriate. The special "ununused" set no
+ longer exists.
+
0.26.0_pre2:
* paludis now supports ${root} in environment.conf. This can be
used when defining the "world" key, so that the configuration
diff --git a/doc/configuration/sets.html.part.in b/doc/configuration/sets.html.part.in
index 8e9774f..dadcecd 100644
--- a/doc/configuration/sets.html.part.in
+++ b/doc/configuration/sets.html.part.in
@@ -24,10 +24,6 @@
<dt><code>insecurity</code></dt>
<dd>The set of insecure packages (mostly for internal use).</dd>
-
- <dt><code>ununused</code></dt>
- <dd>Any packages that, although not part of system or world, should none-the-less not be considered unused (again,
- mostly for internal use).</dd>
</dl>
<h2>User Defined Sets</h2>
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 7b62bbe..5af2688 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -454,6 +454,16 @@ DepList::AddVisitor::visit_leaf(const PackageDepSpec & a)
break;
}
+ if (! best_visible_candidate && ! already_installed->empty() &&
+ (*already_installed->last())->transient_key() && (*already_installed->last())->transient_key()->value() &&
+ (dl_target_package != d->_imp->opts->target_type || ! d->is_top_level_target(**already_installed->last())))
+ {
+ Log::get_instance()->message("dep_list.no_visible.transient", ll_debug, lc_context) << "No visible packages matching '"
+ << a << "', silently falling back to installed package '" << **already_installed->last() << "' as it is transient";
+ d->add_already_installed_package(*already_installed->last(), a.tag(), a, conditions, destinations);
+ return;
+ }
+
/* are we allowed to override mask reasons? */
if (! best_visible_candidate && d->_imp->opts->override_masks)
{
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index dc9e694..235cfc8 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -100,8 +100,7 @@ EnvironmentImplementation::set(const SetName & s) const
tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > result;
/* these sets always exist, even if empty */
- if (s.data() == "everything" || s.data() == "system" || s.data() == "world" || s.data() == "security"
- || s.data() == "ununused")
+ if (s.data() == "everything" || s.data() == "system" || s.data() == "world" || s.data() == "security")
{
Log::get_instance()->message("environment_implementation.standard_set", ll_debug, lc_context) << "Set '" << s << "' is a standard set";
result.reset(new ConstTreeSequence<SetSpecTree, AllDepSpec>(tr1::shared_ptr<AllDepSpec>(new AllDepSpec)));
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index f291e75..5e27d2b 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -1204,7 +1204,7 @@ void
InstallTask::world_update_set(const SetName & s)
{
if (s == SetName("world") || s == SetName("system") || s == SetName("security")
- || s == SetName("everything") || s == SetName("insecurity") || s == SetName("ununused"))
+ || s == SetName("everything") || s == SetName("insecurity"))
{
on_update_world_skip(s, "special sets cannot be added to world");
return;
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 6777c12..9ef1d5b 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -388,7 +388,7 @@ InstalledUnpackagedRepository::package_set(const SetName & s) const
Context context("When fetching package set '" + stringify(s) + "' from '" +
stringify(name()) + "':");
- if ("ununused" == s.data())
+ if ("everything" == s.data())
{
tr1::shared_ptr<ConstTreeSequence<SetSpecTree, AllDepSpec> > result(new ConstTreeSequence<SetSpecTree, AllDepSpec>(
make_shared_ptr(new AllDepSpec)));
@@ -421,7 +421,6 @@ InstalledUnpackagedRepository::sets_list() const
tr1::shared_ptr<SetNameSet> result(new SetNameSet);
result->insert(SetName("everything"));
- result->insert(SetName("ununused"));
return result;
}
diff --git a/paludis/uninstall_list.cc b/paludis/uninstall_list.cc
index b1e0c96..9ff2246 100644
--- a/paludis/uninstall_list.cc
+++ b/paludis/uninstall_list.cc
@@ -427,16 +427,13 @@ UninstallList::add_unused_dependencies()
depped_upon_not_list->begin(), depped_upon_not_list->end(), unused_dependencies->inserter(),
PackageIDSetComparator());
- /* if any of them aren't already on the list, and aren't in world or ununused, add them and recurse */
- tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world"))),
- ununused(_imp->env->set(SetName("ununused")));
+ /* if any of them aren't already on the list, and aren't in world, add them and recurse */
+ tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world")));
for (PackageIDSet::ConstIterator i(unused_dependencies->begin()),
i_end(unused_dependencies->end()) ; i != i_end ; ++i)
{
if (match_package_in_set(*_imp->env, *world, **i))
continue;
- if (ununused && match_package_in_set(*_imp->env, *ununused, **i))
- continue;
if (_imp->uninstall_list.end() != std::find_if(_imp->uninstall_list.begin(),
_imp->uninstall_list.end(), MatchUninstallListEntry(*i)))
@@ -508,15 +505,12 @@ UninstallList::collect_world() const
tr1::shared_ptr<PackageIDSet> result(new PackageIDSet);
tr1::shared_ptr<const PackageIDSet> everything(collect_all_installed());
- tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world"))),
- ununused(_imp->env->set(SetName("ununused")));
+ tr1::shared_ptr<SetSpecTree::ConstItem> world(_imp->env->set(SetName("world")));
for (PackageIDSet::ConstIterator i(everything->begin()),
i_end(everything->end()) ; i != i_end ; ++i)
{
if (match_package_in_set(*_imp->env, *world, **i))
result->insert(*i);
- else if (ununused && match_package_in_set(*_imp->env, *ununused, **i))
- result->insert(*i);
}
return result;
diff --git a/src/clients/importare/command_line.cc b/src/clients/importare/command_line.cc
index 9c1e4f2..c01571b 100644
--- a/src/clients/importare/command_line.cc
+++ b/src/clients/importare/command_line.cc
@@ -61,8 +61,6 @@ CommandLine::CommandLine() :
{
add_usage_line("[ --install ] [ --location path/ ] category/package [ version ] [ slot ]");
- install_args.a_preserve_world.remove();
- install_args.a_preserve_world.set_specified(true);
install_args.a_add_to_world_spec.remove();
install_args.a_debug_build.remove();
install_args.a_checks.remove();
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 0252de0..01970dc 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -902,8 +902,6 @@ DepTagSummaryDisplayer::visit(const GeneralSetDepTag & tag)
std::string desc;
if (tag.short_text() == "world")
desc = ": Packages that have been explicitly installed";
- else if (tag.short_text() == "ununused")
- desc = ": Packages that have been explicitly marked as not unused";
else if (tag.short_text() == "everything")
desc = ": All installed packages";
else if (tag.short_text() == "system")