aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 17:36:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 17:36:13 +0100
commit646d7cb2eec8aa4569233069b12f051b65afdda1 (patch)
tree9a07e405b100305cc77646cdf827474d0757fbc0
parenta24db92055cfadc1a77af3d7fb215960725ccf9f (diff)
downloadpaludis-646d7cb2eec8aa4569233069b12f051b65afdda1.tar.gz
paludis-646d7cb2eec8aa4569233069b12f051b65afdda1.tar.xz
Accounts are unbinaryable
-rw-r--r--paludis/repositories/accounts/accounts_id.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc
index baa1120..9242553 100644
--- a/paludis/repositories/accounts/accounts_id.cc
+++ b/paludis/repositories/accounts/accounts_id.cc
@@ -56,6 +56,8 @@ namespace paludis
const std::shared_ptr<const LiteralMetadataValueKey<FSEntry> > fs_location_key;
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key;
+ static const std::shared_ptr<Set<std::string> > behaviours_set;
+ const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key;
const std::shared_ptr<const AccountsInstalledMask> mask;
const bool is_user;
@@ -86,6 +88,7 @@ namespace paludis
repository(r),
fs_location_key(std::make_shared<LiteralMetadataValueKey<FSEntry>>("location", "Location", mkt_internal, l)),
from_repositories_key(f),
+ behaviours_key(std::make_shared<LiteralMetadataStringSetKey>("behaviours", "behaviours", mkt_internal, behaviours_set)),
mask(m ? std::make_shared<AccountsInstalledMask>() : make_null_shared_ptr()),
is_user(u),
has_file_keys(false),
@@ -95,6 +98,18 @@ namespace paludis
};
}
+namespace
+{
+ std::shared_ptr<Set<std::string> > make_behaviours()
+ {
+ std::shared_ptr<Set<std::string> > result(std::make_shared<Set<std::string>>());
+ result->insert("unbinaryable");
+ return result;
+ }
+}
+
+const std::shared_ptr<Set<std::string> > Imp<AccountsID>::behaviours_set = make_behaviours();
+
AccountsID::AccountsID(const Environment * const e,
const QualifiedPackageName & q, const std::shared_ptr<const Repository> & r,
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > & f, const FSEntry & l,
@@ -406,7 +421,7 @@ AccountsID::fs_location_key() const
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
AccountsID::behaviours_key() const
{
- return make_null_shared_ptr();
+ return _imp->behaviours_key;
}
const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > >