aboutsummaryrefslogtreecommitdiff
path: root/python/environment.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-13 22:22:04 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-25 20:57:34 +0100
commitd3a6729806b151177a499da5045bc0565432ea6d (patch)
tree3002a66bfc8eedefc97f52602cc817574061ff1b /python/environment.cc
parentefe1d56f129dea213603e2f2b58c14e529f2695f (diff)
downloadpaludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.gz
paludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.xz
Do sets differently
Sets from repositories are now named setname::repo, and we automatically create a master setname containing all of those sets. Cache sets cleanly whilst we're at it. Fixes: ticket:746
Diffstat (limited to 'python/environment.cc')
-rw-r--r--python/environment.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/python/environment.cc b/python/environment.cc
index ff44881..043bb39 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -48,19 +48,22 @@ class EnvironmentImplementationWrapper :
private:
std::tr1::shared_ptr<PackageDatabase> _db;
- protected:
- virtual const std::tr1::shared_ptr<const SetSpecTree> local_set(const SetName & s) const
- PALUDIS_ATTRIBUTE((warn_unused_result))
- {
- return make_null_shared_ptr();
- }
-
public:
EnvironmentImplementationWrapper() :
_db(new PackageDatabase(this))
{
}
+ virtual void populate_sets() const
+ {
+ Lock l(get_mutex());
+
+ if (bp::override f = get_override("populate_sets"))
+ f();
+ else
+ throw PythonMethodNotImplemented("EnvironmentImplementation", "populate_sets");
+ }
+
virtual bool accept_license(const std::string & s, const PackageID & p) const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
@@ -357,15 +360,6 @@ class EnvironmentImplementationWrapper :
throw PythonMethodNotImplemented("EnvironmentImplementation", "remove_from_world");
}
- virtual const std::tr1::shared_ptr<const SetSpecTree> world_set() const
- {
- Lock l(get_mutex());
- if (bp::override f = get_override("world_set"))
- return f();
- else
- throw PythonMethodNotImplemented("EnvironmentImplementation", "world_set");
- }
-
virtual std::tr1::shared_ptr<PackageIDSequence> operator[] (const Selection & fg) const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
@@ -566,8 +560,6 @@ void expose_environment()
"This class can be subclassed in Python.",
bp::init<>()
)
- //FIXME - local_set is protected
- //.def("local_set", bp::pure_virtual(&EnvImp::local_set))
.def("accept_license", bp::pure_virtual(&EnvImp::accept_license),
"accept_license(str, PackageID) -> bool\n"