aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Morgan <david.morgan@wadham.oxford.ac.uk> 2006-07-12 20:18:45 +0000
committerAvatar David Morgan <david.morgan@wadham.oxford.ac.uk> 2006-07-12 20:18:45 +0000
commitc62cf898b2444d523d4c2a6afd35b92d517c3cf4 (patch)
tree4d42d78660082115165e38b90d03bb44feb8fc97
parent82765ad29b50c14ea8c01c1593ee088d1b1e8319 (diff)
downloadpaludis-c62cf898b2444d523d4c2a6afd35b92d517c3cf4.tar.gz
paludis-c62cf898b2444d523d4c2a6afd35b92d517c3cf4.tar.xz
More libqualudis fixes
-rw-r--r--paludis/qa/dep_flags_check.cc2
-rw-r--r--paludis/qa/deps_exist_check.cc2
-rw-r--r--paludis/qa/deps_visible_check.cc2
-rw-r--r--paludis/qa/files.m410
-rw-r--r--paludis/qa/iuse_check.cc6
-rw-r--r--paludis/qa/keywords_check.cc6
-rw-r--r--paludis/qa/metadata_check.cc2
7 files changed, 19 insertions, 11 deletions
diff --git a/paludis/qa/dep_flags_check.cc b/paludis/qa/dep_flags_check.cc
index 04bcb26..4061407 100644
--- a/paludis/qa/dep_flags_check.cc
+++ b/paludis/qa/dep_flags_check.cc
@@ -143,7 +143,7 @@ DepFlagsCheck::operator() (const EbuildCheckData & e) const
Checker src_uri_checker(result, "SRC_URI", e.get<ecd_environment>(), iuse);
if (metadata->get_ebuild_interface() == 0)
- result << Message(qal_fatal, "Couldn't generate metadata");
+ result << Message(qal_fatal, "Not an ebuild");
std::string src_uri(metadata->get_ebuild_interface()->get<evm_src_uri>());
diff --git a/paludis/qa/deps_exist_check.cc b/paludis/qa/deps_exist_check.cc
index d947e52..fb25ec4 100644
--- a/paludis/qa/deps_exist_check.cc
+++ b/paludis/qa/deps_exist_check.cc
@@ -45,7 +45,7 @@ namespace
void visit(const PackageDepAtom * const p)
{
- if (env->package_database()->query(p, is_either)->empty())
+ if (env->package_database()->query(PackageDepAtom::Pointer(new PackageDepAtom(p->package())), is_either)->empty())
{
if (in_any)
result << Message(qal_maybe, "No match for " + role + " entry '"
diff --git a/paludis/qa/deps_visible_check.cc b/paludis/qa/deps_visible_check.cc
index ebea9c8..9231db4 100644
--- a/paludis/qa/deps_visible_check.cc
+++ b/paludis/qa/deps_visible_check.cc
@@ -44,7 +44,7 @@ namespace
void visit(const PackageDepAtom * const p)
{
bool found(false);
- PackageDatabaseEntryCollection::Pointer matches(env->package_database()->query(p,
+ PackageDatabaseEntryCollection::Pointer matches(env->package_database()->query(PackageDepAtom::Pointer(new PackageDepAtom(p->package())),
is_either));
for (PackageDatabaseEntryCollection::ReverseIterator m(matches->rbegin()),
m_end(matches->rend()) ; m != m_end ; ++m)
diff --git a/paludis/qa/files.m4 b/paludis/qa/files.m4
index a7e24cf..8e3be39 100644
--- a/paludis/qa/files.m4
+++ b/paludis/qa/files.m4
@@ -16,8 +16,8 @@ dnl add(`defaults_check', `hh', `cc')
add(`dep_any_check', `hh', `cc')
add(`dep_flags_check', `hh', `cc')
add(`dep_packages_check', `hh', `cc')
-dnl add(`deps_exist_check', `hh', `cc')
-dnl add(`deps_visible_check', `hh', `cc')
+add(`deps_exist_check', `hh', `cc')
+add(`deps_visible_check', `hh', `cc')
add(`description_check', `hh', `cc')
add(`digest_collisions_check', `hh', `cc')
add(`ebuild_check', `hh', `cc')
@@ -33,11 +33,11 @@ add(`has_ebuilds_check', `hh', `cc', `test', `testscript')
add(`has_misc_files_check', `hh', `cc', `test', `testscript')
add(`homepage_check', `hh', `cc')
add(`inherits_check', `hh', `cc')
-dnl add(`iuse_check', `hh', `cc')
-dnl add(`keywords_check', `hh', `cc')
+add(`iuse_check', `hh', `cc')
+add(`keywords_check', `hh', `cc')
add(`license_check', `hh', `cc')
add(`message', `hh', `cc', `test')
-dnl add(`metadata_check', `hh', `cc')
+add(`metadata_check', `hh', `cc')
add(`package_dir_check', `hh', `cc')
add(`package_name_check', `hh', `cc', `test', `testscript')
add(`parse_deps_check', `hh', `cc')
diff --git a/paludis/qa/iuse_check.cc b/paludis/qa/iuse_check.cc
index 8a5ab62..7589eca 100644
--- a/paludis/qa/iuse_check.cc
+++ b/paludis/qa/iuse_check.cc
@@ -21,6 +21,7 @@
#include <set>
#include <algorithm>
#include <paludis/util/join.hh>
+#include <paludis/util/tokeniser.hh>
using namespace paludis;
using namespace paludis::qa;
@@ -44,7 +45,10 @@ IuseCheck::operator() (const EbuildCheckData & e) const
try
{
- std::set<UseFlagName> iuse(metadata->begin_iuse(), metadata->end_iuse());
+ std::set<UseFlagName> iuse;
+ WhitespaceTokeniser::get_instance()->tokenise(metadata->get_ebuild_interface()->
+ get<evm_iuse>(), create_inserter<UseFlagName>(std::inserter(iuse, iuse.begin())));
+
static std::set<UseFlagName> iuse_blacklist;
if (iuse_blacklist.empty())
diff --git a/paludis/qa/keywords_check.cc b/paludis/qa/keywords_check.cc
index 4921672..0d8c220 100644
--- a/paludis/qa/keywords_check.cc
+++ b/paludis/qa/keywords_check.cc
@@ -18,6 +18,7 @@
*/
#include <paludis/qa/keywords_check.hh>
+#include <paludis/util/tokeniser.hh>
using namespace paludis;
using namespace paludis::qa;
@@ -41,7 +42,10 @@ KeywordsCheck::operator() (const EbuildCheckData & e) const
try
{
- std::set<KeywordName> keywords(metadata->begin_keywords(), metadata->end_keywords());
+ //std::set<KeywordName> keywords(metadata->begin_keywords(), metadata->end_keywords());
+ std::set<KeywordName> keywords;
+ WhitespaceTokeniser::get_instance()->tokenise(metadata->get_ebuild_interface()->
+ get<evm_keywords>(), create_inserter<KeywordName>(std::inserter(keywords, keywords.begin())));
if (keywords.end() != keywords.find(KeywordName("-*")) &&
keywords.size() == 1)
diff --git a/paludis/qa/metadata_check.cc b/paludis/qa/metadata_check.cc
index c749beb..72ab360 100644
--- a/paludis/qa/metadata_check.cc
+++ b/paludis/qa/metadata_check.cc
@@ -47,7 +47,7 @@ MetadataCheck::operator() (const FSEntry & f) const
dtd /= "cache";
if (! dtd.exists())
- if (0 != mkdir(stringify(dtd).c_str(), 0755))
+ if (0 != dtd.mkdir(0755))
throw ConfigurationError("~/.paludis/cache/ does not exist and cannot be created");
dtd /= "metadata.dtd";