aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/e/e_mask.cc28
-rw-r--r--paludis/repositories/e/e_mask.hh8
-rw-r--r--paludis/repositories/e/ebuild_id.cc14
-rw-r--r--paludis/repositories/fake/fake_package_id.cc18
-rw-r--r--paludis/repositories/fake/fake_package_id.hh4
-rw-r--r--paludis/repositories/virtuals/package_id.cc12
6 files changed, 42 insertions, 42 deletions
diff --git a/paludis/repositories/e/e_mask.cc b/paludis/repositories/e/e_mask.cc
index a2f987811..e2aba5b5d 100644
--- a/paludis/repositories/e/e_mask.cc
+++ b/paludis/repositories/e/e_mask.cc
@@ -30,18 +30,18 @@ namespace paludis
{
const char key;
const std::string description;
- const std::shared_ptr<const MetadataKey> unaccepted_key;
+ const std::string unaccepted_key_name;
- Imp(const char k, const std::string & d, const std::shared_ptr<const MetadataKey> & u) :
+ Imp(const char k, const std::string & d, const std::string & u) :
key(k),
description(d),
- unaccepted_key(u)
+ unaccepted_key_name(u)
{
}
};
}
-EUnacceptedMask::EUnacceptedMask(const char k, const std::string & d, const std::shared_ptr<const MetadataKey> & u) :
+EUnacceptedMask::EUnacceptedMask(const char k, const std::string & d, const std::string & u) :
_imp(k, d, u)
{
}
@@ -62,10 +62,10 @@ EUnacceptedMask::description() const
return _imp->description;
}
-const std::shared_ptr<const MetadataKey>
-EUnacceptedMask::unaccepted_key() const
+const std::string
+EUnacceptedMask::unaccepted_key_name() const
{
- return _imp->unaccepted_key;
+ return _imp->unaccepted_key_name;
}
namespace paludis
@@ -122,18 +122,18 @@ namespace paludis
{
const char key;
const std::string description;
- const std::shared_ptr<const MetadataKey> mask_key;
+ const std::string mask_key_name;
- Imp(const char k, const std::string & d, const std::shared_ptr<const MetadataKey> & m) :
+ Imp(const char k, const std::string & d, const std::string & m) :
key(k),
description(d),
- mask_key(m)
+ mask_key_name(m)
{
}
};
}
-ERepositoryMask::ERepositoryMask(const char k, const std::string & d, const std::shared_ptr<const MetadataKey> & m) :
+ERepositoryMask::ERepositoryMask(const char k, const std::string & d, const std::string & m) :
_imp(k, d, m)
{
}
@@ -154,9 +154,9 @@ ERepositoryMask::description() const
return _imp->description;
}
-const std::shared_ptr<const MetadataKey>
-ERepositoryMask::mask_key() const
+const std::string
+ERepositoryMask::mask_key_name() const
{
- return _imp->mask_key;
+ return _imp->mask_key_name;
}
diff --git a/paludis/repositories/e/e_mask.hh b/paludis/repositories/e/e_mask.hh
index 494755c6b..7ca68f89f 100644
--- a/paludis/repositories/e/e_mask.hh
+++ b/paludis/repositories/e/e_mask.hh
@@ -34,12 +34,12 @@ namespace paludis
Pimp<EUnacceptedMask> _imp;
public:
- EUnacceptedMask(const char, const std::string &, const std::shared_ptr<const MetadataKey> &);
+ EUnacceptedMask(const char, const std::string &, const std::string &);
~EUnacceptedMask();
char key() const;
const std::string description() const;
- const std::shared_ptr<const MetadataKey> unaccepted_key() const;
+ const std::string unaccepted_key_name() const;
};
class EUnsupportedMask :
@@ -64,12 +64,12 @@ namespace paludis
Pimp<ERepositoryMask> _imp;
public:
- ERepositoryMask(const char, const std::string &, const std::shared_ptr<const MetadataKey> &);
+ ERepositoryMask(const char, const std::string &, const std::string &);
~ERepositoryMask();
virtual char key() const;
const std::string description() const;
- const std::shared_ptr<const MetadataKey> mask_key() const;
+ const std::string mask_key_name() const;
};
}
}
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index b01ceb5a5..04c293012 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -532,7 +532,7 @@ EbuildID::need_masks_added() const
{
add_mask(std::make_shared<EUnacceptedMask>('K',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_keyword(), keywords_key()));
+ _imp->environment->distribution())->concept_keyword(), keywords_key()->raw_name()));
}
else if (keywords_key()->value()->end() == std::find_if(keywords_key()->value()->begin(),
keywords_key()->value()->end(), &is_stable_keyword))
@@ -541,7 +541,7 @@ EbuildID::need_masks_added() const
make_named_values<OverriddenMask>(
n::mask() = std::make_shared<EUnacceptedMask>('~',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key()),
+ _imp->environment->distribution())->concept_keyword() + " (unstable accepted)", keywords_key()->raw_name()),
n::override_reason() = mro_accepted_unstable
)));
}
@@ -554,18 +554,18 @@ EbuildID::need_masks_added() const
if (! c.ok)
add_mask(std::make_shared<EUnacceptedMask>('L',
DistributionData::get_instance()->distribution_from_string(
- _imp->environment->distribution())->concept_license(), license_key()));
+ _imp->environment->distribution())->concept_license(), license_key()->raw_name()));
}
if (! _imp->environment->unmasked_by_user(shared_from_this()))
{
/* repo unless user */
if (_imp->repository_mask->value())
- add_mask(std::make_shared<ERepositoryMask>('R', "repository", _imp->repository_mask));
+ add_mask(std::make_shared<ERepositoryMask>('R', "repository", _imp->repository_mask->raw_name()));
/* profile unless user */
if (_imp->profile_mask->value())
- add_mask(std::make_shared<ERepositoryMask>('P', "profile", _imp->profile_mask));
+ add_mask(std::make_shared<ERepositoryMask>('P', "profile", _imp->profile_mask->raw_name()));
/* user */
std::shared_ptr<const Mask> user_mask(_imp->environment->mask_for_user(shared_from_this(), false));
@@ -578,7 +578,7 @@ EbuildID::need_masks_added() const
if (_imp->repository_mask->value())
add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
- n::mask() = std::make_shared<ERepositoryMask>('r', "repository (overridden)", _imp->repository_mask),
+ n::mask() = std::make_shared<ERepositoryMask>('r', "repository (overridden)", _imp->repository_mask->raw_name()),
n::override_reason() = mro_overridden_by_user
)));
@@ -586,7 +586,7 @@ EbuildID::need_masks_added() const
if (_imp->profile_mask->value())
add_overridden_mask(std::make_shared<OverriddenMask>(
make_named_values<OverriddenMask>(
- n::mask() = std::make_shared<ERepositoryMask>('p', "profile (overridden)", _imp->profile_mask),
+ n::mask() = std::make_shared<ERepositoryMask>('p', "profile (overridden)", _imp->profile_mask->raw_name()),
n::override_reason() = mro_overridden_by_user
)));
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 48d0197d8..ea827b956 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -529,18 +529,18 @@ namespace paludis
{
const char key;
const std::string description;
- const std::shared_ptr<const MetadataKey> unaccepted_key;
+ const std::string unaccepted_key_name;
- Imp(const char k, const std::string & d, const std::shared_ptr<const MetadataKey> & u) :
+ Imp(const char k, const std::string & d, const std::string & u) :
key(k),
description(d),
- unaccepted_key(u)
+ unaccepted_key_name(u)
{
}
};
}
-FakeUnacceptedMask::FakeUnacceptedMask(const char c, const std::string & s, const std::shared_ptr<const MetadataKey> & k) :
+FakeUnacceptedMask::FakeUnacceptedMask(const char c, const std::string & s, const std::string & k) :
_imp(c, s, k)
{
}
@@ -561,10 +561,10 @@ FakeUnacceptedMask::description() const
return _imp->description;
}
-const std::shared_ptr<const MetadataKey>
-FakeUnacceptedMask::unaccepted_key() const
+const std::string
+FakeUnacceptedMask::unaccepted_key_name() const
{
- return _imp->unaccepted_key;
+ return _imp->unaccepted_key_name;
}
FakeUnsupportedMask::FakeUnsupportedMask()
@@ -1053,14 +1053,14 @@ FakePackageID::need_masks_added() const
if (keywords_key())
if (! _imp->env->accept_keywords(keywords_key()->value(), shared_from_this()))
- add_mask(std::make_shared<FakeUnacceptedMask>('K', "keywords", keywords_key()));
+ add_mask(std::make_shared<FakeUnacceptedMask>('K', "keywords", keywords_key()->raw_name()));
if (license_key())
{
LicenceChecker c(_imp->env, &Environment::accept_license, shared_from_this());
license_key()->value()->top()->accept(c);
if (! c.ok)
- add_mask(std::make_shared<FakeUnacceptedMask>('L', "license", license_key()));
+ add_mask(std::make_shared<FakeUnacceptedMask>('L', "license", license_key()->raw_name()));
}
if (! _imp->env->unmasked_by_user(shared_from_this()))
diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh
index 80647d97c..02ef7a046 100644
--- a/paludis/repositories/fake/fake_package_id.hh
+++ b/paludis/repositories/fake/fake_package_id.hh
@@ -182,12 +182,12 @@ namespace paludis
Pimp<FakeUnacceptedMask> _imp;
public:
- FakeUnacceptedMask(const char, const std::string &, const std::shared_ptr<const MetadataKey> &);
+ FakeUnacceptedMask(const char, const std::string &, const std::string &);
~FakeUnacceptedMask();
char key() const;
const std::string description() const;
- const std::shared_ptr<const MetadataKey> unaccepted_key() const;
+ const std::string unaccepted_key_name() const;
};
class PALUDIS_VISIBLE FakeUnsupportedMask :
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index c6b20de1d..d96ec3d34 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -462,11 +462,11 @@ namespace
public AssociationMask
{
private:
- const std::shared_ptr<const PackageID> _id;
+ const PackageDepSpec _spec;
public:
- VirtualsAssociationMask(const std::shared_ptr<const PackageID> & i) :
- _id(i)
+ VirtualsAssociationMask(const PackageDepSpec & s) :
+ _spec(s)
{
}
@@ -480,9 +480,9 @@ namespace
return "by association";
}
- const std::shared_ptr<const PackageID> associated_package() const
+ const PackageDepSpec associated_package_spec() const
{
- return _id;
+ return _spec;
}
};
}
@@ -496,7 +496,7 @@ VirtualsPackageID::need_masks_added() const
return;
if (_imp->virtual_for->value()->masked())
- add_mask(std::make_shared<VirtualsAssociationMask>(_imp->virtual_for->value()));
+ add_mask(std::make_shared<VirtualsAssociationMask>(_imp->virtual_for->value()->uniquely_identifying_spec()));
_imp->has_masks = true;
}