aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/unavailable
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/unavailable')
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.cc18
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.hh4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.cc18
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.hh4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc5
5 files changed, 25 insertions, 24 deletions
diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc
index 0c4e7c774..3b46998e1 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.cc
+++ b/paludis/repositories/unavailable/unavailable_package_id.cc
@@ -45,7 +45,7 @@ namespace paludis
const Environment * const env;
const QualifiedPackageName name;
const VersionSpec version;
- const UnavailableRepository * const repo;
+ const RepositoryName repository_name;
const std::shared_ptr<const MetadataValueKey<SlotName> > slot_key;
const std::shared_ptr<const MetadataValueKey<std::string> > description_key;
@@ -59,7 +59,7 @@ namespace paludis
env(e.environment()),
name(e.name()),
version(e.version()),
- repo(e.repository()),
+ repository_name(e.repository()),
slot_key(std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, e.slot())),
description_key(e.description()),
repository_homepage_key(e.repository_homepage()),
@@ -107,12 +107,12 @@ UnavailablePackageID::canonical_form(const PackageIDCanonicalForm f) const
{
case idcf_full:
return stringify(_imp->name) + "-" + stringify(_imp->version) +
- ":" + stringify(_imp->slot_key->value()) + "::" + stringify(_imp->repo->name()) +
+ ":" + stringify(_imp->slot_key->value()) + "::" + stringify(_imp->repository_name) +
" (in ::" + *_imp->from_repositories_key->value()->begin() + ")";
case idcf_no_version:
return stringify(_imp->name) + ":" + stringify(_imp->slot_key->value()) +
- "::" + stringify(_imp->repo->name()) +
+ "::" + stringify(_imp->repository_name) +
" (in ::" + *_imp->from_repositories_key->value()->begin() + ")";
case idcf_version:
@@ -121,7 +121,7 @@ UnavailablePackageID::canonical_form(const PackageIDCanonicalForm f) const
case idcf_no_name:
return stringify(_imp->version) +
- ":" + stringify(_imp->slot_key->value()) + "::" + stringify(_imp->repo->name()) +
+ ":" + stringify(_imp->slot_key->value()) + "::" + stringify(_imp->repository_name) +
" (in ::" + *_imp->from_repositories_key->value()->begin() + ")";
case last_idcf:
@@ -135,7 +135,7 @@ PackageDepSpec
UnavailablePackageID::uniquely_identifying_spec() const
{
return parse_user_package_dep_spec("=" + stringify(name()) + "-" + stringify(version()) +
- (slot_key() ? ":" + stringify(slot_key()->value()) : "") + "::" + stringify(repository()->name()) +
+ (slot_key() ? ":" + stringify(slot_key()->value()) : "") + "::" + stringify(repository_name()) +
"[." + _imp->from_repositories_key->raw_name() + "=" + *_imp->from_repositories_key->value()->begin() + "]",
_imp->env, { });
}
@@ -152,10 +152,10 @@ UnavailablePackageID::version() const
return _imp->version;
}
-const std::shared_ptr<const Repository>
-UnavailablePackageID::repository() const
+const RepositoryName
+UnavailablePackageID::repository_name() const
{
- return _imp->repo->shared_from_this();
+ return _imp->repository_name;
}
bool
diff --git a/paludis/repositories/unavailable/unavailable_package_id.hh b/paludis/repositories/unavailable/unavailable_package_id.hh
index fcad0d6a2..0bfabc6bd 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.hh
+++ b/paludis/repositories/unavailable/unavailable_package_id.hh
@@ -50,7 +50,7 @@ namespace paludis
NamedValue<n::from_repositories, std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > > from_repositories;
NamedValue<n::mask, std::shared_ptr<const Mask> > mask;
NamedValue<n::name, QualifiedPackageName> name;
- NamedValue<n::repository, const UnavailableRepository *> repository;
+ NamedValue<n::repository, RepositoryName> repository;
NamedValue<n::repository_description, std::shared_ptr<const MetadataValueKey<std::string> > > repository_description;
NamedValue<n::repository_homepage, std::shared_ptr<const MetadataValueKey<std::string> > > repository_homepage;
NamedValue<n::slot, SlotName> slot;
@@ -75,7 +75,7 @@ namespace paludis
const std::string canonical_form(const PackageIDCanonicalForm) const;
const QualifiedPackageName name() const;
const VersionSpec version() const;
- const std::shared_ptr<const Repository> repository() const;
+ const RepositoryName repository_name() const;
virtual PackageDepSpec uniquely_identifying_spec() const;
const std::shared_ptr<const MetadataValueKey<SlotName> > slot_key() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc
index 6019982f0..95d0e437a 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_id.cc
@@ -66,7 +66,7 @@ namespace paludis
const Environment * const env;
const QualifiedPackageName name;
const VersionSpec version;
- const UnavailableRepository * const repo;
+ const RepositoryName repository_name;
const std::shared_ptr<const MetadataSpecTreeKey<DependencySpecTree> > dependencies_key;
const std::shared_ptr<const MetadataValueKey<std::string> > description_key;
@@ -80,7 +80,7 @@ namespace paludis
env(e.environment()),
name(e.name()),
version("0", { }),
- repo(e.repository()),
+ repository_name(e.repository()),
dependencies_key(e.dependencies()),
description_key(e.description()),
homepage_key(e.homepage()),
@@ -134,16 +134,16 @@ UnavailableRepositoryID::canonical_form(const PackageIDCanonicalForm f) const
{
case idcf_full:
return stringify(_imp->name) + "-" + stringify(_imp->version) +
- "::" + stringify(_imp->repo->name());
+ "::" + stringify(_imp->repository_name);
case idcf_no_version:
- return stringify(_imp->name) + "::" + stringify(_imp->repo->name());
+ return stringify(_imp->name) + "::" + stringify(_imp->repository_name);
case idcf_version:
return stringify(_imp->version);
case idcf_no_name:
- return stringify(_imp->version) + "::" + stringify(_imp->repo->name());
+ return stringify(_imp->version) + "::" + stringify(_imp->repository_name);
case last_idcf:
break;
@@ -156,7 +156,7 @@ PackageDepSpec
UnavailableRepositoryID::uniquely_identifying_spec() const
{
return parse_user_package_dep_spec("=" + stringify(name()) + "-" + stringify(version())
- + "::" + stringify(repository()->name()),
+ + "::" + stringify(repository_name()),
_imp->env, { });
}
@@ -172,10 +172,10 @@ UnavailableRepositoryID::version() const
return _imp->version;
}
-const std::shared_ptr<const Repository>
-UnavailableRepositoryID::repository() const
+const RepositoryName
+UnavailableRepositoryID::repository_name() const
{
- return _imp->repo->shared_from_this();
+ return _imp->repository_name;
}
bool
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.hh b/paludis/repositories/unavailable/unavailable_repository_id.hh
index 6cfe456f7..9b35cd4be 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.hh
+++ b/paludis/repositories/unavailable/unavailable_repository_id.hh
@@ -52,7 +52,7 @@ namespace paludis
NamedValue<n::homepage, std::shared_ptr<const MetadataValueKey<std::string> > > homepage;
NamedValue<n::mask, std::shared_ptr<const Mask> > mask;
NamedValue<n::name, QualifiedPackageName> name;
- NamedValue<n::repository, const UnavailableRepository *> repository;
+ NamedValue<n::repository, RepositoryName> repository;
NamedValue<n::sync, std::shared_ptr<const MetadataValueKey<std::string> > > sync;
};
@@ -75,7 +75,7 @@ namespace paludis
const std::string canonical_form(const PackageIDCanonicalForm) const;
const QualifiedPackageName name() const;
const VersionSpec version() const;
- const std::shared_ptr<const Repository> repository() const;
+ const RepositoryName repository_name() const;
virtual PackageDepSpec uniquely_identifying_spec() const;
const std::shared_ptr<const MetadataValueKey<SlotName> > slot_key() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index 58792aa16..d246b6853 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -23,6 +23,7 @@
#include <paludis/repositories/unavailable/unavailable_repository_id.hh>
#include <paludis/repositories/unavailable/unavailable_repository_dependencies_key.hh>
#include <paludis/repositories/unavailable/unavailable_mask.hh>
+#include <paludis/repositories/unavailable/unavailable_repository.hh>
#include <paludis/util/pimp-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/set.hh>
@@ -173,7 +174,7 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
n::from_repositories() = from_repositories,
n::mask() = mask,
n::name() = (*i).name(),
- n::repository() = _imp->repo,
+ n::repository() = _imp->repo->name(),
n::repository_description() = repository_description,
n::repository_homepage() = repository_homepage,
n::slot() = (*i).slot(),
@@ -205,7 +206,7 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
n::homepage() = repository_homepage,
n::mask() = mask,
n::name() = CategoryNamePart("repository") + PackageNamePart(file.repo_name()),
- n::repository() = _imp->repo,
+ n::repository() = _imp->repo->name(),
n::sync() = repository_sync
)));