aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-20 14:18:42 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-20 14:18:42 +0100
commit94e9ecd9fec55432a79e43b6964fc63ff80d2e89 (patch)
treead2679620043d795c789e3710c22c12bf490a8d6 /paludis/repositories
parent2f05223862c5c21934b39f2337182b8dfa680f45 (diff)
downloadpaludis-94e9ecd9fec55432a79e43b6964fc63ff80d2e89.tar.gz
paludis-94e9ecd9fec55432a79e43b6964fc63ff80d2e89.tar.xz
Kill --no-config-protection.
It didn't do what you expect anyway. Fixes: ticket:619
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_installed_repository.hh2
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc5
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc5
-rw-r--r--paludis/repositories/e/ebuild.cc5
-rw-r--r--paludis/repositories/e/ebuild.hh2
-rw-r--r--paludis/repositories/e/ebuild_entries.cc1
-rw-r--r--paludis/repositories/e/exndbam_repository.cc7
-rw-r--r--paludis/repositories/e/exndbam_repository.hh2
-rw-r--r--paludis/repositories/e/vdb_repository.cc9
-rw-r--r--paludis/repositories/e/vdb_repository.hh2
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc21
-rw-r--r--paludis/repositories/unpackaged/installed_id.cc6
-rw-r--r--paludis/repositories/unpackaged/installed_id.hh2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc4
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc17
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc2
16 files changed, 23 insertions, 69 deletions
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 319ef36d2..8a972abd1 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -118,7 +118,7 @@ namespace paludis
///\{
virtual void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const = 0;
+ bool reinstalling) const = 0;
virtual void perform_config(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id) const;
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index 19beb9a08..667edd7bc 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -702,10 +702,9 @@ namespace
{
}
- void visit(const UninstallAction & a)
+ void visit(const UninstallAction &)
{
- std::tr1::static_pointer_cast<const EInstalledRepository>(id->repository())->perform_uninstall(id,
- a.options, false);
+ std::tr1::static_pointer_cast<const EInstalledRepository>(id->repository())->perform_uninstall(id, false);
}
void visit(const InstalledAction &)
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index da26ee425..d9c119092 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -1114,7 +1114,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -1340,7 +1339,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -1405,7 +1403,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -1575,7 +1572,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
@@ -2033,7 +2029,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), installed_repo)
);
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index 21045e116..778a70b79 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -578,8 +578,6 @@ EbuildInstallCommand::extend_command(const Command & cmd)
.with_setenv("PALUDIS_LOADSAVEENV_DIR", stringify(install_params[k::loadsaveenv_dir()]))
.with_setenv("PALUDIS_CONFIG_PROTECT", install_params[k::config_protect()])
.with_setenv("PALUDIS_CONFIG_PROTECT_MASK", install_params[k::config_protect_mask()])
- .with_setenv("PALUDIS_EBUILD_OVERRIDE_CONFIG_PROTECT_MASK",
- install_params[k::disable_cfgpro()] ? "/" : "")
.with_setenv("PALUDIS_PROFILE_DIR", stringify(*install_params[k::profiles()]->begin()))
.with_setenv("PALUDIS_PROFILE_DIRS", join(install_params[k::profiles()]->begin(),
install_params[k::profiles()]->end(), " "))
@@ -634,8 +632,7 @@ EbuildUninstallCommand::extend_command(const Command & cmd)
Command result(Command(cmd)
.with_setenv("ROOT", uninstall_params[k::root()])
.with_setenv("PALUDIS_LOADSAVEENV_DIR", stringify(uninstall_params[k::loadsaveenv_dir()]))
- .with_setenv("PALUDIS_EBUILD_OVERRIDE_CONFIG_PROTECT_MASK",
- uninstall_params[k::disable_cfgpro()] ? "/" : ""));
+ );
if (uninstall_params[k::load_environment()])
result
diff --git a/paludis/repositories/e/ebuild.hh b/paludis/repositories/e/ebuild.hh
index ff3fa2131..ebc7ac650 100644
--- a/paludis/repositories/e/ebuild.hh
+++ b/paludis/repositories/e/ebuild.hh
@@ -103,7 +103,6 @@ namespace paludis
kc::Field<k::root, std::string>,
kc::Field<k::profiles, std::tr1::shared_ptr<const FSEntrySequence> >,
kc::Field<k::expand_vars, std::tr1::shared_ptr<const Map<std::string, std::string> > >,
- kc::Field<k::disable_cfgpro, bool>,
kc::Field<k::slot, SlotName>,
kc::Field<k::config_protect, std::string>,
kc::Field<k::config_protect_mask, std::string>,
@@ -134,7 +133,6 @@ namespace paludis
*/
typedef kc::KeyedClass<
kc::Field<k::root, std::string>,
- kc::Field<k::disable_cfgpro, bool>,
kc::Field<k::unmerge_only, bool>,
kc::Field<k::load_environment, const FSEntry *>,
kc::Field<k::loadsaveenv_dir, FSEntry>
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 758c0c58a..d3df168ca 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -708,7 +708,6 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
(k::root(), o[k::destination()]->installed_root_key() ?
stringify(o[k::destination()]->installed_root_key()->value()) : "/")
(k::profiles(), _imp->params.profiles)
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::config_protect(), _imp->e_repository->profile_variable("CONFIG_PROTECT"))
(k::config_protect_mask(), _imp->e_repository->profile_variable("CONFIG_PROTECT_MASK"))
(k::loadsaveenv_dir(), _imp->params.builddir / (stringify(id->name().category) + "-" +
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index d59a7bdf2..9eb927306 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -368,8 +368,7 @@ ExndbamRepository::merge(const MergeParams & m)
if (if_overwritten_id)
{
- UninstallActionOptions uninstall_options(false);
- perform_uninstall(std::tr1::static_pointer_cast<const ERepositoryID>(if_overwritten_id), uninstall_options, true);
+ perform_uninstall(std::tr1::static_pointer_cast<const ERepositoryID>(if_overwritten_id), true);
}
VDBPostMergeCommand post_merge_command(
@@ -380,8 +379,7 @@ ExndbamRepository::merge(const MergeParams & m)
}
void
-ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id,
- const UninstallActionOptions & o, bool replace) const
+ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id, bool replace) const
{
Context context("When uninstalling '" + stringify(*id) + (replace ? "' for a reinstall:" : "':"));
@@ -458,7 +456,6 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
EbuildUninstallCommandParams uninstall_params(EbuildUninstallCommandParams::named_create()
(k::root(), stringify(_imp->params.root))
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::unmerge_only(), false)
(k::loadsaveenv_dir(), ver_dir)
(k::load_environment(), load_env.get()));
diff --git a/paludis/repositories/e/exndbam_repository.hh b/paludis/repositories/e/exndbam_repository.hh
index 49de3fd7b..006c05c38 100644
--- a/paludis/repositories/e/exndbam_repository.hh
+++ b/paludis/repositories/e/exndbam_repository.hh
@@ -108,7 +108,7 @@ namespace paludis
///\{
void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const;
+ bool reinstalling) const;
///\}
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index cd0a136d8..b8dcaf765 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -368,8 +368,7 @@ VDBRepositoryKeyReadError::VDBRepositoryKeyReadError(
}
void
-VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const
+VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID> & id, bool reinstalling) const
{
Context context("When uninstalling '" + stringify(*id) + (reinstalling ? "' for a reinstall:" : "':"));
@@ -437,7 +436,6 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
EbuildUninstallCommandParams uninstall_params(EbuildUninstallCommandParams::named_create()
(k::root(), stringify(_imp->params.root))
- (k::disable_cfgpro(), o[k::no_config_protect()])
(k::unmerge_only(), false)
(k::loadsaveenv_dir(), pkg_dir)
(k::load_environment(), load_env.get()));
@@ -843,10 +841,7 @@ VDBRepository::merge(const MergeParams & m)
merger.merge();
if (is_replace)
- {
- UninstallActionOptions uninstall_options(false);
- perform_uninstall(is_replace, uninstall_options, true);
- }
+ perform_uninstall(is_replace, true);
VDBPostMergeCommand post_merge_command(
VDBPostMergeCommandParams::named_create()
diff --git a/paludis/repositories/e/vdb_repository.hh b/paludis/repositories/e/vdb_repository.hh
index 67657de34..b47483a39 100644
--- a/paludis/repositories/e/vdb_repository.hh
+++ b/paludis/repositories/e/vdb_repository.hh
@@ -105,7 +105,7 @@ namespace paludis
virtual void regenerate_cache() const;
virtual void perform_uninstall(const std::tr1::shared_ptr<const erepository::ERepositoryID> & id,
- const UninstallActionOptions & o, bool reinstalling) const;
+ bool reinstalling) const;
/* RepositoryProvidesInterface */
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index b895f092f..817239a2a 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -337,13 +337,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
InfoAction info_action;
ConfigAction config_action;
@@ -454,13 +451,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
InfoAction info_action;
ConfigAction config_action;
@@ -571,13 +565,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
{
std::vector<FSEntry> cache_contents;
@@ -933,13 +924,10 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
- UninstallAction uninstall_action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction uninstall_action;
TEST_CHECK_EQUAL(read_file(provides_cache), "paludis-3\ninstalled\n");
@@ -1149,7 +1137,6 @@ namespace test_cases
InstallAction install_action(InstallActionOptions::named_create()
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
- (k::no_config_protect(), false)
(k::destination(), vdb_repo)
);
diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc
index 1aa95467d..b4f7bd7eb 100644
--- a/paludis/repositories/unpackaged/installed_id.cc
+++ b/paludis/repositories/unpackaged/installed_id.cc
@@ -676,9 +676,9 @@ namespace
{
}
- void visit(UninstallAction & a)
+ void visit(UninstallAction &)
{
- id->uninstall(a.options, false);
+ id->uninstall(false);
}
};
}
@@ -724,7 +724,7 @@ InstalledUnpackagedID::extra_hash_value() const
}
void
-InstalledUnpackagedID::uninstall(const UninstallActionOptions &, const bool replace) const
+InstalledUnpackagedID::uninstall(const bool replace) const
{
Context context("When uninstalling '" + stringify(*this) + "':");
diff --git a/paludis/repositories/unpackaged/installed_id.hh b/paludis/repositories/unpackaged/installed_id.hh
index aa68682d9..d81a98532 100644
--- a/paludis/repositories/unpackaged/installed_id.hh
+++ b/paludis/repositories/unpackaged/installed_id.hh
@@ -87,7 +87,7 @@ namespace paludis
virtual std::size_t extra_hash_value() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- void uninstall(const UninstallActionOptions &, const bool replace) const;
+ void uninstall(const bool replace) const;
};
}
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 03fe9f70d..acd6f335c 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -367,9 +367,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
if (if_overwritten_id)
{
- std::tr1::static_pointer_cast<const InstalledUnpackagedID>(if_overwritten_id)->uninstall(UninstallActionOptions::named_create()
- (k::no_config_protect(), false),
- true);
+ std::tr1::static_pointer_cast<const InstalledUnpackagedID>(if_overwritten_id)->uninstall(true);
}
}
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index d8732fd38..bd017326e 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -255,9 +255,7 @@ namespace test_cases
const std::tr1::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::All())]->begin());
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction action;
id->perform_action(action);
TEST_CHECK(! FSEntry("installed_repository_TEST_dir/root2/first").exists());
@@ -306,9 +304,7 @@ namespace test_cases
generator::Matches(parse_user_package_dep_spec("cat-one/foo:fred",
&env, UserPackageDepSpecOptions())))]->begin());
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false)
- );
+ UninstallAction action;
id->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/repo3/indices/categories/cat-one/foo").is_symbolic_link());
@@ -391,7 +387,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -446,7 +441,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -504,7 +498,6 @@ namespace test_cases
InstallAction action(InstallActionOptions::named_create()
(k::destination(), repo)
- (k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
(*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
@@ -544,8 +537,7 @@ namespace test_cases
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false));
+ UninstallAction action;
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4a",
&env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
@@ -585,8 +577,7 @@ namespace test_cases
"cat/pkg4b-1.0:foo::installed-unpackaged");
}
- UninstallAction action(UninstallActionOptions::named_create()
- (k::no_config_protect(), false));
+ UninstallAction action;
(*env[selection::RequireExactlyOne(generator::Matches(
parse_user_package_dep_spec("cat/pkg4b",
&env, UserPackageDepSpecOptions())))]->begin())->perform_action(action);
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 0a3915779..90bf59e20 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -218,7 +218,6 @@ namespace test_cases
*env[selection::RequireExactlyOne(generator::All())]->begin());
InstallAction action(InstallActionOptions::named_create()
- (k::no_config_protect(), false)
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
(k::destination(), installed_repo)
@@ -273,7 +272,6 @@ namespace test_cases
*env[selection::RequireExactlyOne(generator::All())]->begin());
InstallAction action(InstallActionOptions::named_create()
- (k::no_config_protect(), false)
(k::debug_build(), iado_none)
(k::checks(), iaco_default)
(k::destination(), installed_repo)