diff options
author | 2011-03-12 16:48:16 +0000 | |
---|---|---|
committer | 2011-03-12 16:48:16 +0000 | |
commit | 7b2b6ba76643d473720f1056eaa09c48ad1a01e7 (patch) | |
tree | c6aca94a7858cde12facad917f8b6f80b5df4078 | |
parent | 857c210a31ffb0a727f8aafec41ec9b5fe13d9c9 (diff) | |
download | paludis-7b2b6ba76643d473720f1056eaa09c48ad1a01e7.tar.gz paludis-7b2b6ba76643d473720f1056eaa09c48ad1a01e7.tar.xz |
Add 'nothing' set
-rw-r--r-- | doc/configuration/sets.html.part.in | 3 | ||||
-rw-r--r-- | paludis/environment_implementation.cc | 8 | ||||
-rw-r--r-- | paludis/repositories/e/e_repository_sets_TEST.cc | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/doc/configuration/sets.html.part.in b/doc/configuration/sets.html.part.in index 8e25722e5..6ced6ab8d 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 6ed5ba9d0..c5236d636 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 e1268331d..ca7aabaa5 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"); |