aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_id.cc
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2012-05-13 18:37:46 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2012-05-13 18:40:50 +0100
commit471ede08c4eb2ac6dec49ce23c84aba28785ee87 (patch)
tree6ecb26a87e817906002681d7bf3957c5c1ef17b5 /paludis/repositories/e/ebuild_id.cc
parent666e567c8a75123e4738b828dff4c35e1df86a99 (diff)
downloadpaludis-471ede08c4eb2ac6dec49ce23c84aba28785ee87.tar.gz
paludis-471ede08c4eb2ac6dec49ce23c84aba28785ee87.tar.xz
Use EAPI from suffix for version parsing
Also removes the need for EbuildID::EbuildID to fetch eapi_when_unknown, since that's already done by the caller.
Diffstat (limited to 'paludis/repositories/e/ebuild_id.cc')
-rw-r--r--paludis/repositories/e/ebuild_id.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 09283e2a9..ae6ae9773 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -204,18 +204,6 @@ namespace paludis
};
}
-namespace
-{
- std::string guess_eapi(const std::string & g, const Environment * const env, const RepositoryName & repo_name)
- {
- if (! g.empty())
- return g;
- auto repo(env->fetch_repository(repo_name));
- auto e_repo(std::static_pointer_cast<const ERepository>(repo));
- return e_repo->params().eapi_when_unknown();
- }
-}
-
EbuildID::EbuildID(const QualifiedPackageName & q, const VersionSpec & v,
const Environment * const e,
const RepositoryName & r,
@@ -223,7 +211,7 @@ EbuildID::EbuildID(const QualifiedPackageName & q, const VersionSpec & v,
const std::string & g,
const time_t t,
const std::shared_ptr<const EclassMtimes> & m) :
- _imp(q, v, e, r, f, guess_eapi(g, e, r), t, m)
+ _imp(q, v, e, r, f, g, t, m)
{
}