aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-05 17:24:42 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-05 19:06:04 +0100
commit0a0afc97925e6c8df3cedd5a4c3dee60a9673785 (patch)
treeebfa071857b3aacd7a4db5dc9bd25c421f505088 /paludis/environments/paludis
parent975c0c94b62ff647c8aceab9c4ff62ca4e47142e (diff)
downloadpaludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.gz
paludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.xz
No need for fancy PackageDepSpecData subclassing
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r--paludis/environments/paludis/world.cc10
-rw-r--r--paludis/environments/paludis/world_TEST.cc6
2 files changed, 11 insertions, 5 deletions
diff --git a/paludis/environments/paludis/world.cc b/paludis/environments/paludis/world.cc
index b546d4f5d..a3de07ae7 100644
--- a/paludis/environments/paludis/world.cc
+++ b/paludis/environments/paludis/world.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/environments/paludis/world.hh>
+
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
@@ -25,9 +26,11 @@
#include <paludis/util/make_named_values.hh>
#include <paludis/util/safe_ofstream.hh>
#include <paludis/util/fs_stat.hh>
+
#include <paludis/set_file.hh>
#include <paludis/user_dep_spec.hh>
-#include <paludis/partially_made_package_dep_spec.hh>
+#include <paludis/dep_spec_data.hh>
+
#include <functional>
using namespace paludis;
@@ -166,7 +169,10 @@ void
World::update_config_files_for_package_move(const PackageDepSpec & s, const QualifiedPackageName & n) const
{
if (_remove_string_from_world(stringify(s)))
- _add_string_to_world(stringify(PartiallyMadePackageDepSpec(s).package(n)));
+ _add_string_to_world(stringify(
+ MutablePackageDepSpecData(*s.data())
+ .unconstrain_package()
+ .constrain_package(n)));
}
const std::shared_ptr<const SetSpecTree>
diff --git a/paludis/environments/paludis/world_TEST.cc b/paludis/environments/paludis/world_TEST.cc
index cbb2f7f19..0b5d5656c 100644
--- a/paludis/environments/paludis/world_TEST.cc
+++ b/paludis/environments/paludis/world_TEST.cc
@@ -23,7 +23,7 @@
#include <paludis/util/safe_ifstream.hh>
#include <paludis/util/options.hh>
-#include <paludis/partially_made_package_dep_spec.hh>
+#include <paludis/dep_spec_data.hh>
#include <iterator>
#include <cstdlib>
@@ -39,8 +39,8 @@ TEST(World, Updates)
{
TestEnvironment env;
paludis_environment::World world(&env, w);
- world.update_config_files_for_package_move(make_package_dep_spec({ })
- .package(QualifiedPackageName("cat/before")),
+ world.update_config_files_for_package_move(MutablePackageDepSpecData({ })
+ .constrain_package(QualifiedPackageName("cat/before")),
QualifiedPackageName("cat/after"));
}