aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-12 16:48:16 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-12 16:48:16 +0000
commit7b2b6ba76643d473720f1056eaa09c48ad1a01e7 (patch)
treec6aca94a7858cde12facad917f8b6f80b5df4078
parent857c210a31ffb0a727f8aafec41ec9b5fe13d9c9 (diff)
downloadpaludis-7b2b6ba76643d473720f1056eaa09c48ad1a01e7.tar.gz
paludis-7b2b6ba76643d473720f1056eaa09c48ad1a01e7.tar.xz
Add 'nothing' set
-rw-r--r--doc/configuration/sets.html.part.in3
-rw-r--r--paludis/environment_implementation.cc8
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc1
3 files changed, 12 insertions, 0 deletions
diff --git a/doc/configuration/sets.html.part.in b/doc/configuration/sets.html.part.in
index 8e25722..6ced6ab 100644
--- a/doc/configuration/sets.html.part.in
+++ b/doc/configuration/sets.html.part.in
@@ -27,6 +27,9 @@
<dt><code>insecurity</code></dt>
<dd>The set of insecure packages (mostly for internal use).</dd>
+
+ <dt><code>nothing</code></dt>
+ <dd>An empty set.</dd>
</dl>
<p>Some sets, such as <code>system</code>, are made by combining sets from multiple repositories. For these sets, the
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index 6ed5ba9..c5236d6 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -307,6 +307,12 @@ namespace
result->top()->append(std::make_shared<NamedSetDepSpec>(SetName("installed-packages")));
return result;
}
+
+ std::shared_ptr<const SetSpecTree> make_nothing_set()
+ {
+ std::shared_ptr<SetSpecTree> result(std::make_shared<SetSpecTree>(std::make_shared<AllDepSpec>()));
+ return result;
+ }
}
void
@@ -328,6 +334,8 @@ EnvironmentImplementation::populate_standard_sets() const
if (_imp->sets.end() != _imp->sets.find(SetName("everything")))
throw InternalError(PALUDIS_HERE, "something's still defining the 'everything' set");
add_set(SetName("everything"), SetName("everything"), make_everything_set, false);
+
+ add_set(SetName("nothing"), SetName("nothing"), make_nothing_set, false);
}
namespace
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index e126833..ca7aaba 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -70,6 +70,7 @@ namespace test_cases
"insecurity::test-repo-1 "
"installed-packages installed-packages::default "
"installed-slots installed-slots::default "
+ "nothing "
"security security::test-repo-1 set1 set1* "
"set1::test-repo-1 set1::test-repo-1* "
"system system::test-repo-1 world world::default");