aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-17 09:15:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-17 09:15:13 +0100
commit4f70937550c52af7b88beedfe59ca9443ed544ee (patch)
treeb63c071729fe574f80fa291516d4aae65b0c8045
parent0cdd08379af124ec3f5d74a86dbdb10aa4987e6f (diff)
downloadpaludis-4f70937550c52af7b88beedfe59ca9443ed544ee.tar.gz
paludis-4f70937550c52af7b88beedfe59ca9443ed544ee.tar.xz
Environment::update_config_files_for_package_move
-rw-r--r--paludis/environment.hh12
-rw-r--r--paludis/environments/no_config/no_config_environment.cc4
-rw-r--r--paludis/environments/no_config/no_config_environment.hh3
-rw-r--r--paludis/environments/paludis/paludis_environment.cc5
-rw-r--r--paludis/environments/paludis/paludis_environment.hh3
-rw-r--r--paludis/environments/portage/portage_environment.cc5
-rw-r--r--paludis/environments/portage/portage_environment.hh3
-rw-r--r--paludis/environments/test/test_environment.cc4
-rw-r--r--paludis/environments/test/test_environment.hh3
-rw-r--r--python/environment.cc6
10 files changed, 47 insertions, 1 deletions
diff --git a/paludis/environment.hh b/paludis/environment.hh
index 702d4cb..b5e363d 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -409,7 +409,7 @@ namespace paludis
///\}
- ///\name World functionality
+ ///\name World and configuration functionality
///\{
/**
@@ -432,6 +432,16 @@ namespace paludis
*/
virtual void remove_from_world(const SetName &) const = 0;
+ /**
+ * Where possible, update configuration files with the first spec to use the second package name.
+ *
+ * Does not necessarily invalidate any in-memory configuration.
+ *
+ * \since 0.48
+ */
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const = 0;
+
///\}
///\name Specific metadata keys
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index 0a2f867..ac67532 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -614,4 +614,8 @@ NoConfigEnvironment::repository_from_new_config_file(const FSEntry &)
throw InternalError(PALUDIS_HERE, "can't create repositories on the fly for NoConfigEnvironment");
}
+void
+NoConfigEnvironment::update_config_files_for_package_move(const PackageDepSpec &, const QualifiedPackageName &) const
+{
+}
diff --git a/paludis/environments/no_config/no_config_environment.hh b/paludis/environments/no_config/no_config_environment.hh
index 1bf5fb8..ecd7841 100644
--- a/paludis/environments/no_config/no_config_environment.hh
+++ b/paludis/environments/no_config/no_config_environment.hh
@@ -222,6 +222,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<Repository> repository_from_new_config_file(
const FSEntry &) PALUDIS_ATTRIBUTE((noreturn));
+
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const;
};
}
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 29a82e5..1186bf2 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -563,3 +563,8 @@ PaludisEnvironment::repository_from_new_config_file(const FSEntry & f)
return RepositoryFactory::get_instance()->create(this, repo_func);
}
+void
+PaludisEnvironment::update_config_files_for_package_move(const PackageDepSpec &, const QualifiedPackageName &) const
+{
+}
+
diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh
index 9c48dbd..8e354f4 100644
--- a/paludis/environments/paludis/paludis_environment.hh
+++ b/paludis/environments/paludis/paludis_environment.hh
@@ -169,6 +169,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<Repository> repository_from_new_config_file(
const FSEntry &) PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const;
};
}
#endif
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index 3bf8518..38d676d 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -1020,3 +1020,8 @@ PortageEnvironment::repository_from_new_config_file(const FSEntry &)
throw InternalError(PALUDIS_HERE, "can't create repositories on the fly for PortageEnvironment");
}
+void
+PortageEnvironment::update_config_files_for_package_move(const PackageDepSpec &, const QualifiedPackageName &) const
+{
+}
+
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index 3ea97c4..e172ee7 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -173,6 +173,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<Repository> repository_from_new_config_file(
const FSEntry &) PALUDIS_ATTRIBUTE((noreturn));
+
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const;
};
}
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 0abeff8..707b02c 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -300,4 +300,8 @@ TestEnvironment::repository_from_new_config_file(const FSEntry &)
throw InternalError(PALUDIS_HERE, "can't create repositories on the fly for TestEnvironment");
}
+void
+TestEnvironment::update_config_files_for_package_move(const PackageDepSpec &, const QualifiedPackageName &) const
+{
+}
diff --git a/paludis/environments/test/test_environment.hh b/paludis/environments/test/test_environment.hh
index 8432964..32bc3d6 100644
--- a/paludis/environments/test/test_environment.hh
+++ b/paludis/environments/test/test_environment.hh
@@ -146,6 +146,9 @@ namespace paludis
virtual const std::tr1::shared_ptr<Repository> repository_from_new_config_file(
const FSEntry &) PALUDIS_ATTRIBUTE((noreturn));
+
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const;
};
}
diff --git a/python/environment.cc b/python/environment.cc
index c1b07b4..b3f93a0 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -443,6 +443,12 @@ class EnvironmentImplementationWrapper :
{
throw PythonMethodNotImplemented("EnvironmentImplementation", "repository_from_new_config_file");
}
+
+ virtual void update_config_files_for_package_move(
+ const PackageDepSpec &, const QualifiedPackageName &) const
+ {
+ throw PythonMethodNotImplemented("EnvironmentImplementation", "update_config_files_for_package_move");
+ }
};
struct NoConfigEnvironmentWrapper :