aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/gentoo
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/gentoo')
-rw-r--r--paludis/repositories/gentoo/ebin_entries.cc9
-rw-r--r--paludis/repositories/gentoo/ebuild.cc2
-rw-r--r--paludis/repositories/gentoo/ebuild_entries.cc7
-rw-r--r--paludis/repositories/gentoo/ebuild_flat_metadata_cache.cc4
-rw-r--r--paludis/repositories/gentoo/portage_repository.cc5
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile.cc9
-rw-r--r--paludis/repositories/gentoo/portage_repository_sets.cc35
-rw-r--r--paludis/repositories/gentoo/vdb_repository.cc14
8 files changed, 52 insertions, 33 deletions
diff --git a/paludis/repositories/gentoo/ebin_entries.cc b/paludis/repositories/gentoo/ebin_entries.cc
index 94f9bdd72..46719c8bf 100644
--- a/paludis/repositories/gentoo/ebin_entries.cc
+++ b/paludis/repositories/gentoo/ebin_entries.cc
@@ -86,13 +86,13 @@ EbinEntries::generate_version_metadata(const QualifiedPackageName & q,
result->eapi = f.get("EAPI");
result->provide_string = f.get("PROVIDE");
- result->src_uri = f.get("SRC_URI");
+ result->src_uri_string = f.get("SRC_URI");
result->restrict_string = f.get("RESTRICT");
result->keywords = f.get("KEYWORDS");
result->iuse = f.get("IUSE");
result->inherited = f.get("INHERITED");
- result->bin_uri = f.get("BIN_URI");
+ result->bin_uri_string = f.get("BIN_URI");
return result;
}
@@ -128,8 +128,7 @@ EbinEntries::install(const QualifiedPackageName & q, const VersionSpec & v,
std::set<std::string> already_in_binaries;
/* make B and FLAT_BIN_URI */
- std::tr1::shared_ptr<const DepSpec> b_spec(PortageDepParser::parse(metadata->ebin_interface->bin_uri,
- PortageDepParserPolicy<PlainTextDepSpec, false>::get_instance()));
+ std::tr1::shared_ptr<const DepSpec> b_spec(metadata->ebin_interface->bin_uri());
DepSpecFlattener f(_imp->params.environment, &e, b_spec);
for (DepSpecFlattener::Iterator ff(f.begin()), ff_end(f.end()) ; ff != ff_end ; ++ff)
@@ -352,7 +351,7 @@ EbinEntries::merge(const MergeOptions & m)
if (metadata->ebuild_interface)
{
ebin_file << "PROVIDE=" << metadata->ebuild_interface->provide_string << std::endl;
- ebin_file << "SRC_URI=" << metadata->ebuild_interface->src_uri << std::endl;
+ ebin_file << "SRC_URI=" << metadata->ebuild_interface->src_uri_string << std::endl;
ebin_file << "RESTRICT=" << metadata->ebuild_interface->restrict_string << std::endl;
ebin_file << "KEYWORDS=" << metadata->ebuild_interface->keywords << std::endl;
ebin_file << "IUSE=" << metadata->ebuild_interface->iuse << std::endl;
diff --git a/paludis/repositories/gentoo/ebuild.cc b/paludis/repositories/gentoo/ebuild.cc
index 6069aedd9..c23e3b566 100644
--- a/paludis/repositories/gentoo/ebuild.cc
+++ b/paludis/repositories/gentoo/ebuild.cc
@@ -184,7 +184,7 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
_metadata->build_depend_string = f.get("DEPEND");
_metadata->run_depend_string = f.get("RDEPEND");
_metadata->slot = SlotName(f.get("SLOT"));
- _metadata->src_uri = f.get("SRC_URI");
+ _metadata->src_uri_string = f.get("SRC_URI");
_metadata->restrict_string = f.get("RESTRICT");
_metadata->homepage = f.get("HOMEPAGE");
_metadata->license_interface->license_string = f.get("LICENSE");
diff --git a/paludis/repositories/gentoo/ebuild_entries.cc b/paludis/repositories/gentoo/ebuild_entries.cc
index 914b8de66..8148e494a 100644
--- a/paludis/repositories/gentoo/ebuild_entries.cc
+++ b/paludis/repositories/gentoo/ebuild_entries.cc
@@ -270,8 +270,7 @@ EbuildEntries::install(const QualifiedPackageName & q, const VersionSpec & v,
std::set<std::string> already_in_archives;
/* make A and FLAT_SRC_URI */
- std::tr1::shared_ptr<const DepSpec> f_spec(PortageDepParser::parse(metadata->ebuild_interface->src_uri,
- PortageDepParserPolicy<PlainTextDepSpec, false>::get_instance()));
+ std::tr1::shared_ptr<const DepSpec> f_spec(metadata->ebuild_interface->src_uri());
DepSpecFlattener f(_imp->params.environment, &e, f_spec);
for (DepSpecFlattener::Iterator ff(f.begin()), ff_end(f.end()) ; ff != ff_end ; ++ff)
@@ -353,9 +352,7 @@ EbuildEntries::install(const QualifiedPackageName & q, const VersionSpec & v,
}
/* make AA */
- std::tr1::shared_ptr<const DepSpec> g_spec(PortageDepParser::parse(
- metadata->ebuild_interface->src_uri,
- PortageDepParserPolicy<PlainTextDepSpec, false>::get_instance()));
+ std::tr1::shared_ptr<const DepSpec> g_spec(metadata->ebuild_interface->src_uri());
AAFinder g(g_spec);
std::set<std::string> already_in_all_archives;
diff --git a/paludis/repositories/gentoo/ebuild_flat_metadata_cache.cc b/paludis/repositories/gentoo/ebuild_flat_metadata_cache.cc
index 10df9fc5a..886b9411c 100644
--- a/paludis/repositories/gentoo/ebuild_flat_metadata_cache.cc
+++ b/paludis/repositories/gentoo/ebuild_flat_metadata_cache.cc
@@ -50,7 +50,7 @@ EbuildFlatMetadataCache::load(std::tr1::shared_ptr<EbuildVersionMetadata> result
std::getline(cache, line); result->build_depend_string = line;
std::getline(cache, line); result->run_depend_string = line;
std::getline(cache, line); result->slot = SlotName(line);
- std::getline(cache, line); result->src_uri = line;
+ std::getline(cache, line); result->src_uri_string = line;
std::getline(cache, line); result->restrict_string = line;
std::getline(cache, line); result->homepage = line;
std::getline(cache, line); result->license_string = line;
@@ -131,7 +131,7 @@ EbuildFlatMetadataCache::save(std::tr1::shared_ptr<const EbuildVersionMetadata>
cache << normalise(v->build_depend_string) << std::endl;
cache << normalise(v->run_depend_string) << std::endl;
cache << normalise(v->slot) << std::endl;
- cache << normalise(v->src_uri) << std::endl;
+ cache << normalise(v->src_uri_string) << std::endl;
cache << normalise(v->restrict_string) << std::endl;
cache << normalise(v->homepage) << std::endl;
cache << normalise(v->license_string) << std::endl;
diff --git a/paludis/repositories/gentoo/portage_repository.cc b/paludis/repositories/gentoo/portage_repository.cc
index e60ec696b..4094d445e 100644
--- a/paludis/repositories/gentoo/portage_repository.cc
+++ b/paludis/repositories/gentoo/portage_repository.cc
@@ -667,7 +667,7 @@ PortageRepository::do_query_repository_masks(const QualifiedPackageName & q, con
{
try
{
- std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(*line));
+ std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(*line, pds_pm_eapi_0));
if (a->package_ptr())
_imp->repo_mask[*a->package_ptr()].push_back(a);
else
@@ -947,7 +947,8 @@ PortageRepository::info(bool verbose) const
{
std::tr1::shared_ptr<const PackageDatabaseEntryCollection> q(
_imp->params.environment->package_database()->query(
- query::Matches(PackageDepSpec(*i)) & query::InstalledAtRoot(_imp->params.environment->root()),
+ query::Matches(PackageDepSpec(*i, pds_pm_eapi_0)) &
+ query::InstalledAtRoot(_imp->params.environment->root()),
qo_order_by_version));
if (q->empty())
package_info->add_kv(*i, "(none)");
diff --git a/paludis/repositories/gentoo/portage_repository_profile.cc b/paludis/repositories/gentoo/portage_repository_profile.cc
index 2501b21bb..8a0e837c6 100644
--- a/paludis/repositories/gentoo/portage_repository_profile.cc
+++ b/paludis/repositories/gentoo/portage_repository_profile.cc
@@ -370,7 +370,7 @@ Implementation<PortageRepositoryProfile>::make_vars_from_file_vars()
continue;
Context context_spec("When parsing '" + *i + "':");
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(i->substr(1)));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(i->substr(1), pds_pm_eapi_0));
spec->set_tag(system_tag);
system_packages->add_child(spec);
}
@@ -393,7 +393,8 @@ Implementation<PortageRepositoryProfile>::make_vars_from_file_vars()
QualifiedPackageName v(tokens[0]);
virtuals.erase(v);
- virtuals.insert(std::make_pair(v, std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(tokens[1]))));
+ virtuals.insert(std::make_pair(v, std::tr1::shared_ptr<PackageDepSpec>(new PackageDepSpec(tokens[1],
+ pds_pm_eapi_0))));
}
}
catch (const NameError & e)
@@ -410,7 +411,7 @@ Implementation<PortageRepositoryProfile>::make_vars_from_file_vars()
try
{
- std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(*line));
+ std::tr1::shared_ptr<const PackageDepSpec> a(new PackageDepSpec(*line, pds_pm_eapi_0));
if (a->package_ptr())
package_mask[*a->package_ptr()].push_back(a);
else
@@ -481,7 +482,7 @@ Implementation<PortageRepositoryProfile>::load_spec_use_file(const FSEntry & fil
try
{
- std::tr1::shared_ptr<const PackageDepSpec> spec(new PackageDepSpec(*tokens.begin()));
+ std::tr1::shared_ptr<const PackageDepSpec> spec(new PackageDepSpec(*tokens.begin(), pds_pm_eapi_0));
PackageFlagStatusMapList::iterator n(m.insert(m.end(), std::make_pair(spec, FlagStatusMap())));
for (std::list<std::string>::const_iterator t(next(tokens.begin())), t_end(tokens.end()) ;
diff --git a/paludis/repositories/gentoo/portage_repository_sets.cc b/paludis/repositories/gentoo/portage_repository_sets.cc
index 1fac666f5..69acc9741 100644
--- a/paludis/repositories/gentoo/portage_repository_sets.cc
+++ b/paludis/repositories/gentoo/portage_repository_sets.cc
@@ -107,19 +107,19 @@ PortageRepositorySets::package_set(const SetName & s) const
Log::get_instance()->message(ll_warning, lc_context,
"Line '" + *line + "' in set file '"
+ stringify(ff) + "' does not specify '*' or '?', assuming '*'");
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(tokens.at(0)));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(tokens.at(0), pds_pm_eapi_0));
spec->set_tag(tag);
result->add_child(spec);
}
else if ("*" == tokens.at(0))
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(tokens.at(1)));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(tokens.at(1), pds_pm_eapi_0));
spec->set_tag(tag);
result->add_child(spec);
}
else if ("?" == tokens.at(0))
{
- std::tr1::shared_ptr<PackageDepSpec> p(new PackageDepSpec(tokens.at(1)));
+ std::tr1::shared_ptr<PackageDepSpec> p(new PackageDepSpec(tokens.at(1), pds_pm_eapi_0));
p->set_tag(tag);
if (p->package_ptr())
{
@@ -320,9 +320,15 @@ PortageRepositorySets::security_set(bool insecurity) const
if (insecurity)
{
+ std::tr1::shared_ptr<VersionRequirements> v(new VersionRequirements::Concrete);
+ v->push_back(VersionRequirement(vo_equal, c->version));
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
- "=" + stringify(c->name) + "-" + stringify(c->version) +
- "::" + stringify(c->repository)));
+ std::tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(c->name)),
+ std::tr1::shared_ptr<CategoryNamePart>(),
+ std::tr1::shared_ptr<PackageNamePart>(),
+ v, vr_and,
+ std::tr1::shared_ptr<SlotName>(),
+ std::tr1::shared_ptr<RepositoryName>(new RepositoryName(c->repository))));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add_child(spec);
}
@@ -335,7 +341,14 @@ PortageRepositorySets::security_set(bool insecurity) const
c->repository)->version_metadata(c->name, c->version)->slot);
std::tr1::shared_ptr<const PackageDatabaseEntryCollection> available(
_imp->environment->package_database()->query(
- query::Matches(PackageDepSpec(stringify(glsa_pkg->name()) + ":" + stringify(wanted_slot))) &
+ query::Matches(PackageDepSpec(
+ std::tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(
+ glsa_pkg->name())),
+ std::tr1::shared_ptr<CategoryNamePart>(),
+ std::tr1::shared_ptr<PackageNamePart>(),
+ std::tr1::shared_ptr<VersionRequirements>(),
+ vr_and,
+ std::tr1::shared_ptr<SlotName>(new SlotName(wanted_slot)))) &
query::RepositoryHasInstallableInterface() &
query::NotMasked(),
qo_order_by_version));
@@ -350,9 +363,15 @@ PortageRepositorySets::security_set(bool insecurity) const
continue;
}
+ std::tr1::shared_ptr<VersionRequirements> v(new VersionRequirements::Concrete);
+ v->push_back(VersionRequirement(vo_equal, r->version));
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
- "=" + stringify(r->name) + "-" + stringify(r->version) +
- "::" + stringify(r->repository)));
+ std::tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(r->name)),
+ std::tr1::shared_ptr<CategoryNamePart>(),
+ std::tr1::shared_ptr<PackageNamePart>(),
+ v, vr_and,
+ std::tr1::shared_ptr<SlotName>(),
+ std::tr1::shared_ptr<RepositoryName>(new RepositoryName(r->repository))));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add_child(spec);
ok = true;
diff --git a/paludis/repositories/gentoo/vdb_repository.cc b/paludis/repositories/gentoo/vdb_repository.cc
index 5f7eff942..7992cb157 100644
--- a/paludis/repositories/gentoo/vdb_repository.cc
+++ b/paludis/repositories/gentoo/vdb_repository.cc
@@ -389,7 +389,7 @@ namespace paludis
try
{
- PackageDepSpec spec("=" + stringify(cat) + "/" + pkg_i->basename());
+ PackageDepSpec spec("=" + stringify(cat) + "/" + pkg_i->basename(), pds_pm_permissive);
entries.push_back(VDBEntry(*spec.package_ptr(),
spec.version_requirements_ptr()->begin()->version_spec));
}
@@ -458,7 +458,7 @@ namespace paludis
}
{
Context local_context("When loading key 'SRC_URI':");
- p->metadata->src_uri = file_contents(location, p->name, p->version, "SRC_URI");
+ p->metadata->src_uri_string = file_contents(location, p->name, p->version, "SRC_URI");
}
{
Context local_context("When loading key 'EAPI':");
@@ -1064,7 +1064,8 @@ VDBRepository::do_package_set(const SetName & s) const
for (std::vector<VDBEntry>::const_iterator p(_imp->entries.begin()),
p_end(_imp->entries.end()) ; p != p_end ; ++p)
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(p->name));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(p->name))));
spec->set_tag(tag);
result->add_child(spec);
}
@@ -1097,7 +1098,8 @@ VDBRepository::do_package_set(const SetName & s) const
}
else
{
- std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(QualifiedPackageName(*line)));
+ std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(
+ std::tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(*line))));
spec->set_tag(tag);
result->add_child(spec);
}
@@ -1413,7 +1415,7 @@ VDBRepository::load_provided_using_cache() const
PackageDatabaseEntry dbe(QualifiedPackageName(tokens.at(0)), VersionSpec(tokens.at(1)), name());
DepSpecFlattener f(_imp->env, &dbe, PortageDepParser::parse(
join(next(next(tokens.begin())), tokens.end(), " "),
- PortageDepParserPolicy<PackageDepSpec, false>::get_instance()));
+ PortageDepParser::Policy::text_is_package_dep_spec(false, pds_pm_permissive)));
for (DepSpecFlattener::Iterator p(f.begin()), p_end(f.end()) ; p != p_end ; ++p)
result->insert(RepositoryProvidesEntry::create()
@@ -1458,7 +1460,7 @@ VDBRepository::load_provided_the_slow_way() const
continue;
std::tr1::shared_ptr<const DepSpec> provide(PortageDepParser::parse(provide_str,
- PortageDepParserPolicy<PackageDepSpec, false>::get_instance()));
+ PortageDepParser::Policy::text_is_package_dep_spec(false, pds_pm_permissive)));
PackageDatabaseEntry dbe(e->name, e->version, name());
DepSpecFlattener f(_imp->env, &dbe, provide);