aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-13 18:02:44 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-13 18:02:44 +0100
commit68f2de2c2c795832607bfbe9249affd36faac431 (patch)
tree69be5cbe7045cca9ba271c732411f29fd750f8ce /ruby
parentef75cff538e62392f02391329bad533ce9adf662 (diff)
downloadpaludis-68f2de2c2c795832607bfbe9249affd36faac431.tar.gz
paludis-68f2de2c2c795832607bfbe9249affd36faac431.tar.xz
Kill InstalledAction
Diffstat (limited to 'ruby')
-rw-r--r--ruby/action.cc42
-rw-r--r--ruby/dep_spec_TEST.rb2
-rw-r--r--ruby/environment_TEST.rb2
-rw-r--r--ruby/filter.cc2
-rw-r--r--ruby/generator.cc4
-rw-r--r--ruby/package_database_TEST.rb4
-rw-r--r--ruby/paludis_ruby.hh1
-rw-r--r--ruby/repository_TEST.rb2
8 files changed, 4 insertions, 55 deletions
diff --git a/ruby/action.cc b/ruby/action.cc
index 92ab7d45b..dc51d55d2 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -46,8 +46,6 @@ namespace
static VALUE c_uninstall_action_options;
static VALUE c_uninstall_action;
- static VALUE c_installed_action;
-
static VALUE c_pretend_action;
static VALUE c_pretend_fetch_action;
@@ -180,8 +178,6 @@ namespace
{
if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, install_action_value_ptr()))
ptr = new std::tr1::shared_ptr<const SupportsActionTestBase>(make_shared_ptr(new SupportsActionTest<InstallAction>()));
- else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, installed_action_value_ptr()))
- ptr = new std::tr1::shared_ptr<const SupportsActionTestBase>(make_shared_ptr(new SupportsActionTest<InstalledAction>()));
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, uninstall_action_value_ptr()))
ptr = new std::tr1::shared_ptr<const SupportsActionTestBase>(make_shared_ptr(new SupportsActionTest<UninstallAction>()));
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, pretend_action_value_ptr()))
@@ -478,27 +474,6 @@ namespace
}
};
- /*
- * Document-method InstalledAction.new
- *
- * call-seq:
- * InstalledAction.new -> InstalledAction
- *
- * Create new InstalledAction
- */
- template <typename A_>
- struct ReallyEasyActionNew
- {
- static VALUE
- easy_action_new(VALUE self)
- {
- std::tr1::shared_ptr<Action> * a(new std::tr1::shared_ptr<Action>(new A_()));
- VALUE tdata(Data_Wrap_Struct(self, 0, &Common<std::tr1::shared_ptr<Action> >::free, a));
- rb_obj_call_init(tdata, 1, &self);
- return tdata;
- }
- };
-
WantPhase want_all_phases(const std::string &)
{
return wp_yes;
@@ -858,17 +833,6 @@ namespace
rb_define_method(c_uninstall_action, "options", RUBY_FUNC_CAST(&uninstall_action_options), 0);
/*
- * Document-class: Paludis::InstalledAction
- *
- * An InstalledAction can be used to test whether a PackageID is
- * installed.
- */
- c_installed_action = rb_define_class_under(paludis_module(), "InstalledAction", c_action);
- rb_define_singleton_method(c_installed_action, "new",
- RUBY_FUNC_CAST((&ReallyEasyActionNew<InstalledAction>::easy_action_new)), 0);
- rb_define_method(c_installed_action, "initialize", RUBY_FUNC_CAST(&empty_init), -1);
-
- /*
* Document-class: Paludis::PretendAction
*
* A PretendAction is used by InstallTask to handle install-pretend-phase checks on a PackageID.
@@ -938,12 +902,6 @@ paludis::ruby::install_action_value_ptr()
}
VALUE *
-paludis::ruby::installed_action_value_ptr()
-{
- return &c_installed_action;
-}
-
-VALUE *
paludis::ruby::pretend_action_value_ptr()
{
return &c_pretend_action;
diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb
index 86159878a..ec6c0a482 100644
--- a/ruby/dep_spec_TEST.rb
+++ b/ruby/dep_spec_TEST.rb
@@ -117,7 +117,7 @@ module Paludis
def test_disambiguate
assert_equal Paludis::parse_user_package_dep_spec("foo", env, []).to_s, "bar/foo"
assert_raise NoSuchPackageError do
- Paludis::parse_user_package_dep_spec("foo", env, [], Filter::SupportsAction.new(InstalledAction))
+ Paludis::parse_user_package_dep_spec("foo", env, [], Filter::SupportsAction.new(ConfigAction))
end
assert_raise AmbiguousPackageNameError do
Paludis::parse_user_package_dep_spec("bar", env, [])
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index f28552d25..a050d4fdc 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -387,7 +387,7 @@ module Paludis
'>=foo/bar-27', env, []), []))]
assert a.empty?
- a = env[Selection::AllVersionsUnsorted.new(Generator::Matches.new(pda2, []) | Filter::SupportsAction.new(InstalledAction))]
+ a = env[Selection::AllVersionsUnsorted.new(Generator::Matches.new(pda2, []) | Filter::SupportsAction.new(ConfigAction))]
assert a.empty?
end
end
diff --git a/ruby/filter.cc b/ruby/filter.cc
index 3997bb73a..f282b3f6f 100644
--- a/ruby/filter.cc
+++ b/ruby/filter.cc
@@ -131,8 +131,6 @@ namespace
{
if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, install_action_value_ptr()))
ptr = new filter::SupportsAction<InstallAction>();
- else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, installed_action_value_ptr()))
- ptr = new filter::SupportsAction<InstalledAction>();
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, uninstall_action_value_ptr()))
ptr = new filter::SupportsAction<UninstallAction>();
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, pretend_action_value_ptr()))
diff --git a/ruby/generator.cc b/ruby/generator.cc
index 52daed9af..e16941ab5 100644
--- a/ruby/generator.cc
+++ b/ruby/generator.cc
@@ -240,10 +240,6 @@ namespace
{
if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, install_action_value_ptr()))
ptr = new generator::SomeIDsMightSupportAction<InstallAction>();
- else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, installed_action_value_ptr()))
- ptr = new generator::SomeIDsMightSupportAction<InstalledAction>();
- else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, uninstall_action_value_ptr()))
- ptr = new generator::SomeIDsMightSupportAction<UninstallAction>();
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, pretend_action_value_ptr()))
ptr = new generator::SomeIDsMightSupportAction<PretendAction>();
else if (Qtrue == rb_funcall2(action_class, rb_intern("<="), 1, config_action_value_ptr()))
diff --git a/ruby/package_database_TEST.rb b/ruby/package_database_TEST.rb
index b927ce25c..a15f8af00 100644
--- a/ruby/package_database_TEST.rb
+++ b/ruby/package_database_TEST.rb
@@ -2,7 +2,7 @@
# vim: set sw=4 sts=4 et tw=80 :
#
-# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
# Copyright (c) 2007 Richard Brown
#
# This file is part of the Paludis package manager. Paludis is free software;
@@ -67,7 +67,7 @@ module Paludis
db.fetch_unique_qualified_package_name('foobarbaz')
end
assert_raise NoSuchPackageError do
- db.fetch_unique_qualified_package_name('bar', Filter::SupportsAction.new(InstalledAction))
+ db.fetch_unique_qualified_package_name('bar', Filter::SupportsAction.new(ConfigAction))
end
end
diff --git a/ruby/paludis_ruby.hh b/ruby/paludis_ruby.hh
index 58b04f5cf..532225276 100644
--- a/ruby/paludis_ruby.hh
+++ b/ruby/paludis_ruby.hh
@@ -142,7 +142,6 @@ namespace paludis
VALUE * config_action_value_ptr();
VALUE * uninstall_action_value_ptr();
VALUE * pretend_action_value_ptr();
- VALUE * installed_action_value_ptr();
VALUE * pretend_fetch_action_value_ptr();
VALUE * dependency_labels_dep_spec_value_ptr();
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 122f4751d..1ec084f79 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -383,9 +383,7 @@ module Paludis
def test_some_ids_might_support
assert repo.some_ids_might_support_action(SupportsActionTest.new(InstallAction))
- assert ! repo.some_ids_might_support_action(SupportsActionTest.new(InstalledAction))
assert ! installed_repo.some_ids_might_support_action(SupportsActionTest.new(InstallAction))
- assert installed_repo.some_ids_might_support_action(SupportsActionTest.new(InstalledAction))
end
end