diff options
author | 2011-06-12 00:02:09 +0100 | |
---|---|---|
committer | 2011-06-12 00:02:09 +0100 | |
commit | 5b0842d9e71d1c97696e6d98648588f15f15ee00 (patch) | |
tree | d7b055c816d8fe7b793256fef5b5b64eea06e0e3 | |
parent | db912317e5772a943818ba85238af5d5acce85c5 (diff) | |
download | paludis-5b0842d9e71d1c97696e6d98648588f15f15ee00.tar.gz paludis-5b0842d9e71d1c97696e6d98648588f15f15ee00.tar.xz |
Rename to remove mention of provides
-rw-r--r-- | paludis/resolver/Makefile.am | 6 | ||||
-rw-r--r-- | paludis/resolver/accumulate_deps-fwd.hh (renamed from paludis/resolver/accumulate_deps_and_provides-fwd.hh) | 8 | ||||
-rw-r--r-- | paludis/resolver/accumulate_deps.cc (renamed from paludis/resolver/accumulate_deps_and_provides.cc) | 10 | ||||
-rw-r--r-- | paludis/resolver/accumulate_deps.hh (renamed from paludis/resolver/collect_provided.hh) | 8 | ||||
-rw-r--r-- | paludis/resolver/accumulate_deps_and_provides.hh | 25 | ||||
-rw-r--r-- | paludis/resolver/collect_provided-fwd.hh | 38 | ||||
-rw-r--r-- | paludis/resolver/collect_provided.cc | 64 | ||||
-rw-r--r-- | paludis/resolver/collect_purges.cc | 6 | ||||
-rw-r--r-- | paludis/resolver/decider.cc | 6 |
9 files changed, 19 insertions, 152 deletions
diff --git a/paludis/resolver/Makefile.am b/paludis/resolver/Makefile.am index e00201ddd..825b68e23 100644 --- a/paludis/resolver/Makefile.am +++ b/paludis/resolver/Makefile.am @@ -28,7 +28,7 @@ BUILT_SOURCES = \ use_existing-se.hh use_existing-se.cc noinst_HEADERS = \ - accumulate_deps_and_provides.hh accumulate_deps_and_provides-fwd.hh \ + accumulate_deps.hh accumulate_deps-fwd.hh \ allow_choice_changes_helper.hh allow_choice_changes_helper-fwd.hh \ allowed_to_remove_helper.hh allowed_to_remove_helper-fwd.hh \ allowed_to_restart_helper.hh allowed_to_restart_helper-fwd.hh \ @@ -39,7 +39,6 @@ noinst_HEADERS = \ change_type.hh change_type-fwd.hh change_type-se.hh \ collect_depped_upon.hh collect_depped_upon-fwd.hh \ collect_installed.hh collect_installed-fwd.hh \ - collect_provided.hh collect_provided-fwd.hh \ collect_purges.hh collect_purges-fwd.hh \ collect_world.hh collect_world-fwd.hh \ confirm_helper.hh confirm_helper-fwd.hh \ @@ -102,7 +101,7 @@ noinst_HEADERS = \ why_changed_choices.hh why_changed_choices-fwd.hh libpaludisresolver_a_SOURCES = \ - accumulate_deps_and_provides.cc \ + accumulate_deps.cc \ allow_choice_changes_helper.cc \ allowed_to_remove_helper.cc \ allowed_to_restart_helper.cc \ @@ -113,7 +112,6 @@ libpaludisresolver_a_SOURCES = \ change_type.cc \ collect_depped_upon.cc \ collect_installed.cc \ - collect_provided.cc \ collect_purges.cc \ collect_world.cc \ confirm_helper.cc \ diff --git a/paludis/resolver/accumulate_deps_and_provides-fwd.hh b/paludis/resolver/accumulate_deps-fwd.hh index c076b7510..5200d4882 100644 --- a/paludis/resolver/accumulate_deps_and_provides-fwd.hh +++ b/paludis/resolver/accumulate_deps-fwd.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2010 Ciaran McCreesh + * Copyright (c) 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -17,8 +17,8 @@ * Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_AND_PROVIDES_FWD_HH -#define PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_AND_PROVIDES_FWD_HH 1 +#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_FWD_HH +#define PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_FWD_HH 1 #include <paludis/util/attributes.hh> #include <paludis/environment-fwd.hh> @@ -29,7 +29,7 @@ namespace paludis { namespace resolver { - const std::shared_ptr<const PackageIDSet> accumulate_deps_and_provides( + const std::shared_ptr<const PackageIDSet> accumulate_deps( const Environment * const, const std::shared_ptr<const PackageIDSet> & start, const std::shared_ptr<const PackageIDSequence> & will_eventually_have, diff --git a/paludis/resolver/accumulate_deps_and_provides.cc b/paludis/resolver/accumulate_deps.cc index d5172cc59..2beeadad5 100644 --- a/paludis/resolver/accumulate_deps_and_provides.cc +++ b/paludis/resolver/accumulate_deps.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2010 Ciaran McCreesh + * Copyright (c) 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -17,9 +17,8 @@ * Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <paludis/resolver/accumulate_deps_and_provides.hh> +#include <paludis/resolver/accumulate_deps.hh> #include <paludis/resolver/collect_depped_upon.hh> -#include <paludis/resolver/collect_provided.hh> #include <paludis/util/set.hh> #include <paludis/util/sequence.hh> #include <paludis/util/wrapped_output_iterator.hh> @@ -30,7 +29,7 @@ using namespace paludis; using namespace paludis::resolver; const std::shared_ptr<const PackageIDSet> -paludis::resolver::accumulate_deps_and_provides( +paludis::resolver::accumulate_deps( const Environment * const env, const std::shared_ptr<const PackageIDSet> & start, const std::shared_ptr<const PackageIDSequence> & will_eventually_have, @@ -55,9 +54,6 @@ paludis::resolver::accumulate_deps_and_provides( const std::shared_ptr<const PackageIDSet> depped_upon(collect_depped_upon( env, *i, will_eventually_have, std::make_shared<PackageIDSequence>())); std::copy(depped_upon->begin(), depped_upon->end(), result->inserter()); - - const std::shared_ptr<const PackageIDSet> provided(collect_provided(env, *i)); - std::copy(provided->begin(), provided->end(), result->inserter()); } if (! recurse) diff --git a/paludis/resolver/collect_provided.hh b/paludis/resolver/accumulate_deps.hh index 3218712e9..2d6937327 100644 --- a/paludis/resolver/collect_provided.hh +++ b/paludis/resolver/accumulate_deps.hh @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2010 Ciaran McCreesh + * Copyright (c) 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -17,9 +17,9 @@ * Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_COLLECT_PROVIDED_HH -#define PALUDIS_GUARD_PALUDIS_RESOLVER_COLLECT_PROVIDED_HH 1 +#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_HH +#define PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_HH 1 -#include <paludis/resolver/collect_provided-fwd.hh> +#include <paludis/resolver/accumulate_deps-fwd.hh> #endif diff --git a/paludis/resolver/accumulate_deps_and_provides.hh b/paludis/resolver/accumulate_deps_and_provides.hh deleted file mode 100644 index 36105c1b2..000000000 --- a/paludis/resolver/accumulate_deps_and_provides.hh +++ /dev/null @@ -1,25 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_AND_PROVIDES_HH -#define PALUDIS_GUARD_PALUDIS_RESOLVER_ACCUMULATE_DEPS_AND_PROVIDES_HH 1 - -#include <paludis/resolver/accumulate_deps_and_provides-fwd.hh> - -#endif diff --git a/paludis/resolver/collect_provided-fwd.hh b/paludis/resolver/collect_provided-fwd.hh deleted file mode 100644 index a94c11a54..000000000 --- a/paludis/resolver/collect_provided-fwd.hh +++ /dev/null @@ -1,38 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2010 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef PALUDIS_GUARD_PALUDIS_RESOLVER_COLLECT_PROVIDED_FWD_HH -#define PALUDIS_GUARD_PALUDIS_RESOLVER_COLLECT_PROVIDED_FWD_HH 1 - -#include <paludis/util/attributes.hh> -#include <paludis/util/set-fwd.hh> -#include <paludis/package_id-fwd.hh> -#include <paludis/environment-fwd.hh> - -namespace paludis -{ - namespace resolver - { - const std::shared_ptr<const PackageIDSet> collect_provided( - const Environment * const, - const std::shared_ptr<const PackageID> & id) PALUDIS_ATTRIBUTE((warn_unused_result)); - } -} - -#endif diff --git a/paludis/resolver/collect_provided.cc b/paludis/resolver/collect_provided.cc deleted file mode 100644 index d4a7ea2f4..000000000 --- a/paludis/resolver/collect_provided.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2010, 2011 Ciaran McCreesh - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <paludis/resolver/collect_provided.hh> -#include <paludis/util/set.hh> -#include <paludis/util/wrapped_output_iterator.hh> -#include <paludis/util/stringify.hh> -#include <paludis/dep_spec_flattener.hh> -#include <paludis/package_id.hh> -#include <paludis/metadata_key.hh> -#include <paludis/spec_tree.hh> -#include <paludis/environment.hh> -#include <paludis/selection.hh> -#include <paludis/generator.hh> -#include <paludis/filtered_generator.hh> -#include <paludis/filter.hh> -#include <algorithm> - -using namespace paludis; -using namespace paludis::resolver; - -const std::shared_ptr<const PackageIDSet> -paludis::resolver::collect_provided( - const Environment * const env, - const std::shared_ptr<const PackageID> & id) -{ - Context context("When collecting packages provided by '" + stringify(*id) + "':"); - - const std::shared_ptr<PackageIDSet> result(std::make_shared<PackageIDSet>()); - - if (id->provide_key()) - { - DepSpecFlattener<ProvideSpecTree, PackageDepSpec> f(env, id); - id->provide_key()->parse_value()->top()->accept(f); - - for (DepSpecFlattener<ProvideSpecTree, PackageDepSpec>::ConstIterator v(f.begin()), v_end(f.end()) ; - v != v_end ; ++v) - { - const std::shared_ptr<const PackageIDSequence> virtuals((*env)[selection::AllVersionsUnsorted( - generator::Matches(**v, id, { }))]); - std::copy(virtuals->begin(), virtuals->end(), result->inserter()); - } - } - - return result; -} - - diff --git a/paludis/resolver/collect_purges.cc b/paludis/resolver/collect_purges.cc index 2139b62e9..b4288796a 100644 --- a/paludis/resolver/collect_purges.cc +++ b/paludis/resolver/collect_purges.cc @@ -1,7 +1,7 @@ /* vim: set sw=4 sts=4 et foldmethod=syntax : */ /* - * Copyright (c) 2010 Ciaran McCreesh + * Copyright (c) 2010, 2011 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General @@ -19,7 +19,7 @@ #include <paludis/resolver/collect_purges.hh> #include <paludis/resolver/collect_world.hh> -#include <paludis/resolver/accumulate_deps_and_provides.hh> +#include <paludis/resolver/accumulate_deps.hh> #include <paludis/util/set.hh> #include <paludis/util/sequence.hh> #include <paludis/util/wrapped_forward_iterator.hh> @@ -38,7 +38,7 @@ paludis::resolver::collect_purges( const std::function<void ()> & step) { const std::shared_ptr<const PackageIDSet> world(collect_world(env, have_now)); - const std::shared_ptr<const PackageIDSet> world_plus_deps(accumulate_deps_and_provides(env, world, have_now_seq, true, step)); + const std::shared_ptr<const PackageIDSet> world_plus_deps(accumulate_deps(env, world, have_now_seq, true, step)); const std::shared_ptr<PackageIDSet> unused(std::make_shared<PackageIDSet>()); std::set_difference(have_now->begin(), have_now->end(), diff --git a/paludis/resolver/decider.cc b/paludis/resolver/decider.cc index 3dd19d250..c62995924 100644 --- a/paludis/resolver/decider.cc +++ b/paludis/resolver/decider.cc @@ -34,7 +34,7 @@ #include <paludis/resolver/collect_depped_upon.hh> #include <paludis/resolver/collect_installed.hh> #include <paludis/resolver/collect_purges.hh> -#include <paludis/resolver/accumulate_deps_and_provides.hh> +#include <paludis/resolver/accumulate_deps.hh> #include <paludis/resolver/why_changed_choices.hh> #include <paludis/resolver/same_slot.hh> #include <paludis/resolver/reason_utils.hh> @@ -2146,9 +2146,9 @@ Decider::_resolve_purges() const std::shared_ptr<PackageIDSequence> will_eventually_have(std::make_shared<PackageIDSequence>()); std::copy(will_eventually_have_set->begin(), will_eventually_have_set->end(), will_eventually_have->back_inserter()); - const std::shared_ptr<const PackageIDSet> used_originally(accumulate_deps_and_provides(_imp->env, going_away, will_eventually_have, false, + const std::shared_ptr<const PackageIDSet> used_originally(accumulate_deps(_imp->env, going_away, will_eventually_have, false, std::bind(&Environment::trigger_notifier_callback, _imp->env, NotifierCallbackResolverStepEvent()))); - const std::shared_ptr<const PackageIDSet> used_afterwards(accumulate_deps_and_provides(_imp->env, newly_available, will_eventually_have, false, + const std::shared_ptr<const PackageIDSet> used_afterwards(accumulate_deps(_imp->env, newly_available, will_eventually_have, false, std::bind(&Environment::trigger_notifier_callback, _imp->env, NotifierCallbackResolverStepEvent()))); const std::shared_ptr<PackageIDSet> used_originally_and_not_going_away(std::make_shared<PackageIDSet>()); |