aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 14:20:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 20:52:24 +0100
commite52571861104efe6139b78b22557211f08025f11 (patch)
tree634bec98491886d12f8f5a25b24f4cacf8d69de5 /paludis/environments/paludis
parent80bf4ad14bfd8ab74a9c0d5f203ad5a370351def (diff)
downloadpaludis-e52571861104efe6139b78b22557211f08025f11.tar.gz
paludis-e52571861104efe6139b78b22557211f08025f11.tar.xz
Revert the package dep spec changes
Diffstat (limited to 'paludis/environments/paludis')
-rw-r--r--paludis/environments/paludis/keywords_conf.cc16
-rw-r--r--paludis/environments/paludis/licenses_conf.cc14
-rw-r--r--paludis/environments/paludis/suggestions_conf.cc20
-rw-r--r--paludis/environments/paludis/world.cc10
-rw-r--r--paludis/environments/paludis/world_TEST.cc6
5 files changed, 24 insertions, 42 deletions
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index 461807841..4837cfb12 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -17,21 +17,18 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/environments/paludis/keywords_conf.hh>
-#include <paludis/environments/paludis/paludis_environment.hh>
-#include <paludis/environments/paludis/bashable_conf.hh>
-
+#include "keywords_conf.hh"
#include <paludis/environment.hh>
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
#include <paludis/spec_tree.hh>
#include <paludis/user_dep_spec.hh>
#include <paludis/match_package.hh>
-#include <paludis/package_id.hh>
-#include <paludis/package_dep_spec_requirement.hh>
-
#include <paludis/util/config_file.hh>
#include <paludis/util/options.hh>
+#include <paludis/package_id.hh>
+#include <paludis/environments/paludis/paludis_environment.hh>
+#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/tokeniser.hh>
@@ -41,7 +38,6 @@
#include <paludis/util/set.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_null_shared_ptr.hh>
-
#include <unordered_map>
#include <list>
#include <vector>
@@ -108,9 +104,9 @@ KeywordsConf::add(const FSPath & filename)
{
std::shared_ptr<PackageDepSpec> d(std::make_shared<PackageDepSpec>(parse_user_package_dep_spec(
tokens.at(0), _imp->env, { updso_allow_wildcards, updso_no_disambiguation, updso_throw_if_set })));
- if (d->package_name_requirement())
+ if (d->package_ptr())
{
- KeywordsList & k(_imp->qualified[d->package_name_requirement()->name()][d]);
+ KeywordsList & k(_imp->qualified[*d->package_ptr()][d]);
for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ;
t != t_end ; ++t)
k.push_back(KeywordName(*t));
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index 6c4a15cf2..7e5829278 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -17,10 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/environments/paludis/licenses_conf.hh>
-#include <paludis/environments/paludis/paludis_environment.hh>
-#include <paludis/environments/paludis/bashable_conf.hh>
-
+#include "licenses_conf.hh"
#include <paludis/environment.hh>
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
@@ -29,9 +26,9 @@
#include <paludis/match_package.hh>
#include <paludis/util/config_file.hh>
#include <paludis/package_id.hh>
-#include <paludis/package_dep_spec_requirement.hh>
-
#include <paludis/util/options.hh>
+#include <paludis/environments/paludis/paludis_environment.hh>
+#include <paludis/environments/paludis/bashable_conf.hh>
#include <paludis/util/log.hh>
#include <paludis/util/tokeniser.hh>
#include <paludis/util/pimp-impl.hh>
@@ -40,7 +37,6 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_null_shared_ptr.hh>
-
#include <unordered_map>
#include <list>
#include <vector>
@@ -108,9 +104,9 @@ LicensesConf::add(const FSPath & filename)
std::shared_ptr<PackageDepSpec> d(std::make_shared<PackageDepSpec>(parse_user_package_dep_spec(
tokens.at(0), _imp->env,
{ updso_allow_wildcards, updso_no_disambiguation, updso_throw_if_set })));
- if (d->package_name_requirement())
+ if (d->package_ptr())
{
- LicensesList & k(_imp->qualified[d->package_name_requirement()->name()][d]);
+ LicensesList & k(_imp->qualified[*d->package_ptr()][d]);
for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ;
t != t_end ; ++t)
k.push_back(*t);
diff --git a/paludis/environments/paludis/suggestions_conf.cc b/paludis/environments/paludis/suggestions_conf.cc
index 4289dc62f..fa9c313d0 100644
--- a/paludis/environments/paludis/suggestions_conf.cc
+++ b/paludis/environments/paludis/suggestions_conf.cc
@@ -21,7 +21,6 @@
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environments/paludis/paludis_config.hh>
#include <paludis/environments/paludis/bashable_conf.hh>
-
#include <paludis/util/config_file.hh>
#include <paludis/util/options.hh>
#include <paludis/util/log.hh>
@@ -32,7 +31,6 @@
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/hashes.hh>
#include <paludis/util/make_null_shared_ptr.hh>
-
#include <paludis/environment.hh>
#include <paludis/name.hh>
#include <paludis/dep_spec.hh>
@@ -41,8 +39,6 @@
#include <paludis/match_package.hh>
#include <paludis/package_id.hh>
#include <paludis/dep_spec_annotations.hh>
-#include <paludis/package_dep_spec_requirement.hh>
-
#include <unordered_map>
#include <list>
#include <vector>
@@ -150,9 +146,9 @@ SuggestionsConf::add(const FSPath & filename)
std::shared_ptr<PackageDepSpec> d(std::make_shared<PackageDepSpec>(parse_user_package_dep_spec(
tokens.at(0), _imp->env,
{ updso_allow_wildcards, updso_no_disambiguation, updso_throw_if_set })));
- if (d->package_name_requirement())
+ if (d->package_ptr())
{
- ValuesList & k(_imp->qualified[d->package_name_requirement()->name()][d]);
+ ValuesList & k(_imp->qualified[*d->package_ptr()][d]);
for (std::vector<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ;
t != t_end ; ++t)
k.push_back(ValueFlag(*t));
@@ -212,10 +208,10 @@ SuggestionsConf::interest_in_suggestion(
else
{
if (! l->pkg_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().package()) != l->pkg_requirement)
+ if (stringify(spec.package_ptr()->package()) != l->pkg_requirement)
continue;
if (! l->cat_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().category()) != l->cat_requirement)
+ if (stringify(spec.package_ptr()->category()) != l->cat_requirement)
continue;
return l->negated ? false : true;
@@ -256,10 +252,10 @@ SuggestionsConf::interest_in_suggestion(
else
{
if (! l->pkg_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().package()) != l->pkg_requirement)
+ if (stringify(spec.package_ptr()->package()) != l->pkg_requirement)
continue;
if (! l->cat_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().category()) != l->cat_requirement)
+ if (stringify(spec.package_ptr()->category()) != l->cat_requirement)
continue;
return l->negated ? false : true;
@@ -287,10 +283,10 @@ SuggestionsConf::interest_in_suggestion(
else
{
if (! l->pkg_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().package()) != l->pkg_requirement)
+ if (stringify(spec.package_ptr()->package()) != l->pkg_requirement)
continue;
if (! l->cat_requirement.empty())
- if (stringify(spec.package_name_requirement()->name().category()) != l->cat_requirement)
+ if (stringify(spec.package_ptr()->category()) != l->cat_requirement)
continue;
return l->negated ? false : true;
diff --git a/paludis/environments/paludis/world.cc b/paludis/environments/paludis/world.cc
index 32569258a..b546d4f5d 100644
--- a/paludis/environments/paludis/world.cc
+++ b/paludis/environments/paludis/world.cc
@@ -18,7 +18,6 @@
*/
#include <paludis/environments/paludis/world.hh>
-
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/mutex.hh>
#include <paludis/util/stringify.hh>
@@ -26,11 +25,9 @@
#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/dep_spec_data.hh>
-
+#include <paludis/partially_made_package_dep_spec.hh>
#include <functional>
using namespace paludis;
@@ -169,10 +166,7 @@ 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(
- MutablePackageDepSpecData(*s.data())
- .unrequire_package()
- .require_package(n)));
+ _add_string_to_world(stringify(PartiallyMadePackageDepSpec(s).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 d3b572ff5..cbb2f7f19 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/dep_spec_data.hh>
+#include <paludis/partially_made_package_dep_spec.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(MutablePackageDepSpecData({ })
- .require_package(QualifiedPackageName("cat/before")),
+ world.update_config_files_for_package_move(make_package_dep_spec({ })
+ .package(QualifiedPackageName("cat/before")),
QualifiedPackageName("cat/after"));
}