aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-07 08:38:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-01-07 11:32:57 +0000
commit3ea2abf9c474dda8581c7ff5ae10178dd98641e9 (patch)
tree3c3d84805b62063c76c224974fac83e87b2f6e3b
parent363508101b74cb7c3c58f10d28a19fd17cb590a7 (diff)
downloadpaludis-3ea2abf9c474dda8581c7ff5ae10178dd98641e9.tar.gz
paludis-3ea2abf9c474dda8581c7ff5ae10178dd98641e9.tar.xz
ID isn't needed
-rw-r--r--paludis/repositories/e/e_installed_repository_id.cc4
-rw-r--r--paludis/repositories/e/e_key.cc21
-rw-r--r--paludis/repositories/e/e_key.hh2
-rw-r--r--paludis/repositories/e/ebuild_id.cc2
4 files changed, 16 insertions, 13 deletions
diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc
index a12eb0f..1b34141 100644
--- a/paludis/repositories/e/e_installed_repository_id.cc
+++ b/paludis/repositories/e/e_installed_repository_id.cc
@@ -313,8 +313,8 @@ EInstalledRepositoryID::need_keys_added() const
if (! vars->license()->name().empty())
if ((_imp->dir / vars->license()->name()).stat().exists())
{
- _imp->keys->license = std::make_shared<ELicenseKey>(_imp->environment, shared_from_this(), vars->license(),
- file_contents(_imp->dir / vars->license()->name()), mkt_normal);
+ _imp->keys->license = std::make_shared<ELicenseKey>(_imp->environment, vars->license(), eapi(),
+ file_contents(_imp->dir / vars->license()->name()), mkt_normal);
add_metadata_key(_imp->keys->license);
}
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index a450469..fea62c8 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -201,21 +201,23 @@ namespace paludis
struct Imp<ELicenseKey>
{
const Environment * const env;
- const std::shared_ptr<const ERepositoryID> id;
const std::string string_value;
mutable Mutex value_mutex;
mutable std::shared_ptr<const LicenseSpecTree> value;
const std::shared_ptr<const EAPIMetadataVariable> variable;
+ const std::shared_ptr<const EAPI> eapi;
const MetadataKeyType type;
Imp(const Environment * const e,
- const std::shared_ptr<const ERepositoryID> & i, const std::string & v,
- const std::shared_ptr<const EAPIMetadataVariable> & m, const MetadataKeyType t) :
+ const std::string & v,
+ const std::shared_ptr<const EAPIMetadataVariable> & m,
+ const std::shared_ptr<const EAPI> & p,
+ const MetadataKeyType t) :
env(e),
- id(i),
string_value(v),
variable(m),
+ eapi(p),
type(t)
{
}
@@ -224,9 +226,10 @@ namespace paludis
ELicenseKey::ELicenseKey(
const Environment * const e,
- const std::shared_ptr<const ERepositoryID> & id,
- const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v, const MetadataKeyType t) :
- Pimp<ELicenseKey>(e, id, v, m, t)
+ const std::shared_ptr<const EAPIMetadataVariable> & m,
+ const std::shared_ptr<const EAPI> & p,
+ const std::string & v, const MetadataKeyType t) :
+ Pimp<ELicenseKey>(e, v, m, p, t)
{
}
@@ -241,8 +244,8 @@ ELicenseKey::value() const
if (_imp->value)
return _imp->value;
- Context context("When parsing metadata key '" + raw_name() + "' from '" + stringify(*_imp->id) + "':");
- _imp->value = parse_license(_imp->string_value, _imp->env, *_imp->id->eapi());
+ Context context("When parsing metadata key '" + raw_name() + "':");
+ _imp->value = parse_license(_imp->string_value, _imp->env, *_imp->eapi);
return _imp->value;
}
diff --git a/paludis/repositories/e/e_key.hh b/paludis/repositories/e/e_key.hh
index ff9270b..fcc1c81 100644
--- a/paludis/repositories/e/e_key.hh
+++ b/paludis/repositories/e/e_key.hh
@@ -230,8 +230,8 @@ namespace paludis
public:
ELicenseKey(
const Environment * const,
- const std::shared_ptr<const ERepositoryID> &,
const std::shared_ptr<const EAPIMetadataVariable> &,
+ const std::shared_ptr<const EAPI> &,
const std::string &, const MetadataKeyType);
~ELicenseKey();
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 0e64fe5..7be634d 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -1027,7 +1027,7 @@ void
EbuildID::load_license(const std::shared_ptr<const EAPIMetadataVariable> & m, const std::string & v) const
{
Lock l(_imp->mutex);
- _imp->license = std::make_shared<ELicenseKey>(_imp->environment, shared_from_this(), m, v, mkt_internal);
+ _imp->license = std::make_shared<ELicenseKey>(_imp->environment, m, eapi(), v, mkt_internal);
add_metadata_key(_imp->license);
}