aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-27 20:35:18 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-02-27 20:35:18 +0000
commit761f72d25876dac3e239fad163123d35cacda4a0 (patch)
treef8b0b5725f1cc53b9840c36cda10527f97c7ed4c
parentf37072df0cbd9bf0a2d3ad670728e1238ea243db (diff)
downloadpaludis-761f72d25876dac3e239fad163123d35cacda4a0.tar.gz
paludis-761f72d25876dac3e239fad163123d35cacda4a0.tar.xz
Nothing uses default_destinations now
-rw-r--r--paludis/environment.hh11
-rw-r--r--paludis/environment_implementation.cc15
-rw-r--r--paludis/environment_implementation.hh3
-rw-r--r--paludis/repository-fwd.hh10
-rw-r--r--python/additional_tests.cc2
-rw-r--r--python/environment.cc26
-rwxr-xr-xpython/environment_TEST.py8
-rw-r--r--python/repository.cc10
-rw-r--r--ruby/environment.cc22
-rw-r--r--ruby/environment_TEST.rb16
10 files changed, 2 insertions, 121 deletions
diff --git a/paludis/environment.hh b/paludis/environment.hh
index c072bb1..4c791a6 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -412,17 +412,6 @@ namespace paludis
///\}
- ///\name Destination information
- ///\{
-
- /**
- * Default destination candidates for installing packages.
- */
- virtual std::shared_ptr<const DestinationsSet> default_destinations() const
- PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
-
- ///\}
-
///\name Hook methods
///\{
diff --git a/paludis/environment_implementation.cc b/paludis/environment_implementation.cc
index 8cde9bd..6ed5ba9 100644
--- a/paludis/environment_implementation.cc
+++ b/paludis/environment_implementation.cc
@@ -163,21 +163,6 @@ EnvironmentImplementation::fetchers_dirs() const
return result;
}
-std::shared_ptr<const DestinationsSet>
-EnvironmentImplementation::default_destinations() const
-{
- std::shared_ptr<DestinationsSet> result(std::make_shared<DestinationsSet>());
-
- for (PackageDatabase::RepositoryConstIterator r(package_database()->begin_repositories()),
- r_end(package_database()->end_repositories()) ;
- r != r_end ; ++r)
- if ((**r).destination_interface())
- if ((**r).destination_interface()->is_default_destination())
- result->insert(*r);
-
- return result;
-}
-
std::string
EnvironmentImplementation::distribution() const
{
diff --git a/paludis/environment_implementation.hh b/paludis/environment_implementation.hh
index a6b99a1..04fff5b 100644
--- a/paludis/environment_implementation.hh
+++ b/paludis/environment_implementation.hh
@@ -78,9 +78,6 @@ namespace paludis
virtual std::shared_ptr<const FSPathSequence> fetchers_dirs() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual std::shared_ptr<const DestinationsSet> default_destinations() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
virtual std::string distribution() const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repository-fwd.hh b/paludis/repository-fwd.hh
index 1143776..4c60666 100644
--- a/paludis/repository-fwd.hh
+++ b/paludis/repository-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009, 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
@@ -46,14 +46,6 @@ namespace paludis
class RepositoryDestinationInterface;
class RepositoryManifestInterface;
- /**
- * A set of destinations, used to decide whether a PackageID can be
- * installed to a particular Repository.
- *
- * \ingroup g_repository
- */
- typedef Set<std::shared_ptr<Repository> > DestinationsSet;
-
struct MergeParams;
}
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index b3ca316..fc1d5bf 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -88,8 +88,6 @@ namespace environment
e.set(SetName("set"));
- e.default_destinations();
-
e.perform_hook(Hook("test"), make_null_shared_ptr());
e.distribution();
diff --git a/python/environment.cc b/python/environment.cc
index 1a0d3f8..5e5bd3c 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -275,22 +275,6 @@ class EnvironmentImplementationWrapper :
return EnvironmentImplementation::set(s);
}
- virtual std::shared_ptr<const DestinationsSet> default_destinations() const
- PALUDIS_ATTRIBUTE((warn_unused_result))
- {
- Lock l(get_mutex());
-
- if (bp::override f = get_override("default_destinations"))
- return f();
- return EnvironmentImplementation::default_destinations();
- }
-
- std::shared_ptr<const DestinationsSet> default_default_destinations() const
- PALUDIS_ATTRIBUTE((warn_unused_result))
- {
- return EnvironmentImplementation::default_destinations();
- }
-
// FIXME - Hooks are not exposed
virtual HookResult perform_hook(const Hook & h, const std::shared_ptr<OutputManager> &) const
PALUDIS_ATTRIBUTE((warn_unused_result))
@@ -544,11 +528,6 @@ void expose_environment()
"and provides various methods for querying package visibility and options.",
bp::no_init
)
- .add_property("default_destinations", &Environment::default_destinations,
- "[ro] DestinationsIterable\n"
- "Default destination candidates for installing packages."
- )
-
.add_property("package_database", bp::make_function(package_database,
bp::with_custodian_and_ward_postcall<0, 1>()),
"[ro] PackageDatabase\n"
@@ -674,11 +653,6 @@ void expose_environment()
"If the named set is not known, returns None."
)
- .def("default_destinations", &EnvImp::default_destinations, &EnvImpW::default_default_destinations,
- "default_destinations() -> list of Repository\n"
- "Default destination candidates for installing packages."
- )
-
.def("distribution", &EnvImp::distribution, &EnvImpW::default_distribution,
"distribution() -> str\n"
"NEED_DOC"
diff --git a/python/environment_TEST.py b/python/environment_TEST.py
index 59a8bc5..8b94905 100755
--- a/python/environment_TEST.py
+++ b/python/environment_TEST.py
@@ -70,10 +70,6 @@ class TestCase_01_Environments(unittest.TestCase):
self.assert_(isinstance(nce2.main_repository, Repository))
self.assert_(isinstance(nce2.master_repository, Repository))
- def test_10_default_destinations(self):
- self.assert_(isinstance(self.e.default_destinations, DestinationsIterable))
- self.assert_(isinstance(self.nce.default_destinations, DestinationsIterable))
-
def test_11_set_accept_unstable(self):
self.nce.accept_unstable = True
self.assertRaises(AttributeError, lambda: self.nce.accept_unstable)
@@ -138,10 +134,6 @@ class TestCase_04_Environment_subclassingd(unittest.TestCase):
def set(self, set):
return AllDepSpec()
- def default_destinations(self):
- e = EnvironmentFactory.instance.create("")
- return [x for x in e.package_database.repositories]
-
def distribution(self):
return EnvironmentImplementation.distribution(self)
diff --git a/python/repository.cc b/python/repository.cc
index 5fd1961..bbcce38 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -116,16 +116,6 @@ namespace
void expose_repository()
{
/**
- * DestinationIterable
- */
- class_iterable<DestinationsSet>
- (
- "DestinationsIterable",
- "Iterable of Repository.",
- true
- );
-
- /**
* Repository
*/
register_shared_ptrs_to_python<Repository>(rsp_const);
diff --git a/ruby/environment.cc b/ruby/environment.cc
index e8befb2..8d9d9b8 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 Ciaran McCreesh
* Copyright (c) 2007, 2008 Richard Brown
*
* This file is part of the Paludis package manager. Paludis is free software;
@@ -187,25 +187,6 @@ namespace
}
}
- /*
- * call-seq:
- * default_destinations -> Array
- *
- * Default: All repositories that provide RepositoryDestinationInterface and mark themselves
- * as a default destination.
- */
- VALUE
- environment_default_destinations(VALUE self)
- {
- std::shared_ptr<const DestinationsSet> dc (value_to_environment(self)->default_destinations());
- VALUE result(rb_ary_new());
- for (DestinationsSet::ConstIterator i(dc->begin()), i_end(dc->end()) ; i != i_end ; ++i)
- rb_ary_push(result, repository_to_value(*i));
-
- return result;
-
- }
-
VALUE
environment_distribution(VALUE self)
{
@@ -485,7 +466,6 @@ namespace
rb_funcall(c_environment, rb_intern("private_class_method"), 1, rb_str_new2("new"));
rb_define_method(c_environment, "package_database", RUBY_FUNC_CAST(&environment_package_database), 0);
rb_define_method(c_environment, "set", RUBY_FUNC_CAST(&environment_set), 1);
- rb_define_method(c_environment, "default_destinations", RUBY_FUNC_CAST(&environment_default_destinations), 0);
rb_define_method(c_environment, "distribution", RUBY_FUNC_CAST(&environment_distribution), 0);
rb_define_method(c_environment, "accept_license", RUBY_FUNC_CAST(&environment_accept_license), 2);
rb_define_method(c_environment, "accept_keywords", RUBY_FUNC_CAST(&environment_accept_keywords), 2);
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index dd76c4d..9da0eb1 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -219,12 +219,6 @@ module Paludis
end
end
- class TestCase_EnvironmentDefaultDestinations < Test::Unit::TestCase
- def test_default_destinations
- assert_kind_of Array, env.default_destinations
- end
- end
-
class TestCase_EnvironmentDistribution < Test::Unit::TestCase
def env
NoConfigEnvironment.new(Dir.getwd().to_s + "/environment_TEST_dir/testrepo")
@@ -236,16 +230,6 @@ module Paludis
end
end
- class TestCase_EnvironmentDefaultDestinations < Test::Unit::TestCase
- def env
- NoConfigEnvironment.new(Dir.getwd().to_s + "/environment_TEST_dir/testrepo")
- end
-
- def test_default_destinations
- assert_kind_of Array, env.default_destinations
- end
- end
-
class TestCase_EnvironmentSetAcceptUnstable < Test::Unit::TestCase
def env
NoConfigEnvironment.new(Dir.getwd().to_s + "/environment_TEST_dir/testrepo")