aboutsummaryrefslogtreecommitdiff
path: root/paludis/qa
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/qa')
-rw-r--r--paludis/qa/dep_any_check.cc9
-rw-r--r--paludis/qa/dep_flags_check.cc20
-rw-r--r--paludis/qa/dep_packages_check.cc6
-rw-r--r--paludis/qa/deps_exist_check.cc9
-rw-r--r--paludis/qa/deps_visible_check.cc9
-rw-r--r--paludis/qa/extract_check.cc5
-rw-r--r--paludis/qa/parse_deps_check.cc16
-rw-r--r--paludis/qa/pdepend_overlap_check.cc9
-rw-r--r--paludis/qa/src_uri_check.cc4
9 files changed, 35 insertions, 52 deletions
diff --git a/paludis/qa/dep_any_check.cc b/paludis/qa/dep_any_check.cc
index 660bbbcce..8908eb402 100644
--- a/paludis/qa/dep_any_check.cc
+++ b/paludis/qa/dep_any_check.cc
@@ -114,16 +114,13 @@ DepAnyCheck::operator() (const EbuildCheckData & e) const
if (metadata->deps_interface)
{
Checker depend_checker(result, "DEPEND");
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_checker);
+ metadata->deps_interface->build_depend()->accept(&depend_checker);
Checker rdepend_checker(result, "RDEPEND");
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_checker);
+ metadata->deps_interface->run_depend()->accept(&rdepend_checker);
Checker pdepend_checker(result, "PDEPEND");
- std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend)->accept(&pdepend_checker);
+ metadata->deps_interface->post_depend()->accept(&pdepend_checker);
}
}
catch (const InternalError &)
diff --git a/paludis/qa/dep_flags_check.cc b/paludis/qa/dep_flags_check.cc
index 9b666718d..f4d01f91a 100644
--- a/paludis/qa/dep_flags_check.cc
+++ b/paludis/qa/dep_flags_check.cc
@@ -146,30 +146,22 @@ DepFlagsCheck::operator() (const EbuildCheckData & e) const
iuse.insert(UseFlagName("build"));
Checker depend_checker(result, "DEPEND", e.environment, iuse);
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_checker);
+ metadata->deps_interface->build_depend()->accept(&depend_checker);
Checker rdepend_checker(result, "RDEPEND", e.environment, iuse);
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_checker);
+ metadata->deps_interface->run_depend()->accept(&rdepend_checker);
Checker pdepend_checker(result, "PDEPEND", e.environment, iuse);
- std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend)->accept(&pdepend_checker);
+ metadata->deps_interface->post_depend()->accept(&pdepend_checker);
Checker provide_checker(result, "PROVIDE", e.environment, iuse);
- std::string provide(metadata->ebuild_interface->provide_string);
- PortageDepParser::parse(provide, PortageDepParserPolicy<PackageDepSpec, false>::get_instance())->accept(&provide_checker);
+ metadata->ebuild_interface->provide()->accept(&provide_checker);
Checker license_checker(result, "LICENSE", e.environment, iuse);
- std::string license(metadata->license_interface->license_string);
- PortageDepParser::parse(license, PortageDepParserPolicy<PlainTextDepSpec, true>::get_instance())->accept(&license_checker);
+ metadata->license_interface->license()->accept(&license_checker);
Checker src_uri_checker(result, "SRC_URI", e.environment, iuse);
-
- std::string src_uri(metadata->ebuild_interface->src_uri);
-
- PortageDepParser::parse(src_uri, PortageDepParserPolicy<PlainTextDepSpec, true>::get_instance())->accept(&src_uri_checker);
+ metadata->ebuild_interface->src_uri()->accept(&src_uri_checker);
}
}
catch (const InternalError &)
diff --git a/paludis/qa/dep_packages_check.cc b/paludis/qa/dep_packages_check.cc
index c6e2a6dc9..b3679b8e1 100644
--- a/paludis/qa/dep_packages_check.cc
+++ b/paludis/qa/dep_packages_check.cc
@@ -111,8 +111,7 @@ DepPackagesCheck::operator() (const EbuildCheckData & e) const
}
Checker depend_checker(result, "DEPEND", suspicious_depend);
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_checker);
+ metadata->deps_interface->build_depend()->accept(&depend_checker);
static std::set<QualifiedPackageName> suspicious_rdepend;
if (suspicious_rdepend.empty())
@@ -135,8 +134,7 @@ DepPackagesCheck::operator() (const EbuildCheckData & e) const
}
Checker rdepend_checker(result, "RDEPEND", suspicious_rdepend);
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_checker);
+ metadata->deps_interface->run_depend()->accept(&rdepend_checker);
}
catch (const InternalError &)
{
diff --git a/paludis/qa/deps_exist_check.cc b/paludis/qa/deps_exist_check.cc
index 0ca565bd3..5a69cb9b4 100644
--- a/paludis/qa/deps_exist_check.cc
+++ b/paludis/qa/deps_exist_check.cc
@@ -107,16 +107,13 @@ DepsExistCheck::operator() (const EbuildCheckData & e) const
e.environment->package_database()->fetch_repository(ee.repository)->version_metadata(ee.name, ee.version));
Checker depend_checker(result, "DEPEND", e.environment);
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_checker);
+ metadata->deps_interface->build_depend()->accept(&depend_checker);
Checker rdepend_checker(result, "RDEPEND", e.environment);
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_checker);
+ metadata->deps_interface->run_depend()->accept(&rdepend_checker);
Checker pdepend_checker(result, "PDEPEND", e.environment);
- std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend)->accept(&pdepend_checker);
+ metadata->deps_interface->post_depend()->accept(&pdepend_checker);
}
catch (const InternalError &)
{
diff --git a/paludis/qa/deps_visible_check.cc b/paludis/qa/deps_visible_check.cc
index 5779dedf0..ef233f298 100644
--- a/paludis/qa/deps_visible_check.cc
+++ b/paludis/qa/deps_visible_check.cc
@@ -209,16 +209,13 @@ DepsVisibleCheck::operator() (const PerProfileEbuildCheckData & e) const
else
{
Checker depend_checker(result, "DEPEND", e.environment, ee, unstable);
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_checker);
+ metadata->deps_interface->build_depend()->accept(&depend_checker);
Checker rdepend_checker(result, "RDEPEND", e.environment, ee, unstable);
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_checker);
+ metadata->deps_interface->run_depend()->accept(&rdepend_checker);
Checker pdepend_checker(result, "PDEPEND", e.environment, ee, unstable);
- std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend)->accept(&pdepend_checker);
+ metadata->deps_interface->post_depend()->accept(&pdepend_checker);
}
if (unstable)
diff --git a/paludis/qa/extract_check.cc b/paludis/qa/extract_check.cc
index b701b4b6b..b6464a076 100644
--- a/paludis/qa/extract_check.cc
+++ b/paludis/qa/extract_check.cc
@@ -89,9 +89,8 @@ ExtractCheck::operator() (const EbuildCheckData & e) const
e.environment->package_database()->fetch_repository(ee.repository)->version_metadata(ee.name, ee.version));
Checker checker;
- PortageDepParser::parse(metadata->ebuild_interface->src_uri,
- PortageDepParserPolicy<PlainTextDepSpec, false>::get_instance())->accept(&checker);
- PortageDepParser::parse(metadata->deps_interface->build_depend_string)->accept(&checker);
+ metadata->ebuild_interface->src_uri()->accept(&checker);
+ metadata->deps_interface->build_depend()->accept(&checker);
if (checker.need_zip && ! checker.have_zip)
result << Message(qal_major, "Found .zip in SRC_URI but app-arch/unzip is not in DEPEND");
diff --git a/paludis/qa/parse_deps_check.cc b/paludis/qa/parse_deps_check.cc
index 31c91f034..ab14c676b 100644
--- a/paludis/qa/parse_deps_check.cc
+++ b/paludis/qa/parse_deps_check.cc
@@ -47,7 +47,9 @@ ParseDepsCheck::operator() (const EbuildCheckData & e) const
try
{
std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend);
+ PortageDepParser::parse(depend, PortageDepParser::Policy::text_is_package_dep_spec(true,
+ metadata->eapi_as_package_dep_spec_parse_mode() == pds_pm_eapi_0 ?
+ pds_pm_eapi_0_strict : metadata->eapi_as_package_dep_spec_parse_mode()));
}
catch (const Exception & err)
{
@@ -58,8 +60,10 @@ ParseDepsCheck::operator() (const EbuildCheckData & e) const
try
{
std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend);
- }
+ PortageDepParser::parse(rdepend, PortageDepParser::Policy::text_is_package_dep_spec(true,
+ metadata->eapi_as_package_dep_spec_parse_mode() == pds_pm_eapi_0 ?
+ pds_pm_eapi_0_strict : metadata->eapi_as_package_dep_spec_parse_mode()));
+}
catch (const Exception & err)
{
result << Message(qal_fatal, "Unparsable RDEPEND: '" +
@@ -69,8 +73,10 @@ ParseDepsCheck::operator() (const EbuildCheckData & e) const
try
{
std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend);
- }
+ PortageDepParser::parse(pdepend, PortageDepParser::Policy::text_is_package_dep_spec(true,
+ metadata->eapi_as_package_dep_spec_parse_mode() == pds_pm_eapi_0 ?
+ pds_pm_eapi_0_strict : metadata->eapi_as_package_dep_spec_parse_mode()));
+}
catch (const Exception & err)
{
result << Message(qal_fatal, "Unparsable PDEPEND: '" +
diff --git a/paludis/qa/pdepend_overlap_check.cc b/paludis/qa/pdepend_overlap_check.cc
index 09ac9180b..870f50079 100644
--- a/paludis/qa/pdepend_overlap_check.cc
+++ b/paludis/qa/pdepend_overlap_check.cc
@@ -82,13 +82,11 @@ PdependOverlapCheck::operator() (const EbuildCheckData & e) const
e.environment->package_database()->fetch_repository(ee.repository)->version_metadata(ee.name, ee.version));
Collector pdepend_collector;
- std::string pdepend(metadata->deps_interface->post_depend_string);
- PortageDepParser::parse(pdepend)->accept(&pdepend_collector);
+ metadata->deps_interface->post_depend()->accept(&pdepend_collector);
{
Collector depend_collector;
- std::string depend(metadata->deps_interface->build_depend_string);
- PortageDepParser::parse(depend)->accept(&depend_collector);
+ metadata->deps_interface->build_depend()->accept(&depend_collector);
std::set<QualifiedPackageName> overlap;
std::set_intersection(depend_collector.result.begin(), depend_collector.result.end(),
@@ -102,8 +100,7 @@ PdependOverlapCheck::operator() (const EbuildCheckData & e) const
{
Collector rdepend_collector;
- std::string rdepend(metadata->deps_interface->run_depend_string);
- PortageDepParser::parse(rdepend)->accept(&rdepend_collector);
+ metadata->deps_interface->run_depend()->accept(&rdepend_collector);
std::set<QualifiedPackageName> overlap;
std::set_intersection(rdepend_collector.result.begin(), rdepend_collector.result.end(),
diff --git a/paludis/qa/src_uri_check.cc b/paludis/qa/src_uri_check.cc
index 0d66f5523..0bb42a445 100644
--- a/paludis/qa/src_uri_check.cc
+++ b/paludis/qa/src_uri_check.cc
@@ -143,13 +143,13 @@ SrcUriCheck::operator() (const EbuildCheckData & e) const
std::tr1::shared_ptr<const VersionMetadata> metadata(
e.environment->package_database()->fetch_repository(ee.repository)->version_metadata(ee.name, ee.version));
- std::string src_uri(metadata->ebuild_interface->src_uri);
+ std::string src_uri(metadata->ebuild_interface->src_uri_string);
std::tr1::shared_ptr<const DepSpec> src_uri_parts;
try
{
src_uri_parts = PortageDepParser::parse(src_uri,
- PortageDepParserPolicy<PlainTextDepSpec, false>::get_instance());
+ PortageDepParser::Policy::text_is_text_dep_spec(false));
std::set<std::string> restricts;
Tokeniser<delim_kind::AnyOfTag, delim_mode::DelimiterTag> tokeniser(" \t\n");