aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 23:22:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 23:22:12 +0000
commit9fde8b77f228890f857bc1acfea73247af0b1447 (patch)
treed764c96d97ae0932398784f949550ce95810ed95
parent92d75c7e92c867e1a9d6800e750cb9cabbb5ade5 (diff)
downloadpaludis-9fde8b77f228890f857bc1acfea73247af0b1447.tar.gz
paludis-9fde8b77f228890f857bc1acfea73247af0b1447.tar.xz
Tidy up qa somewhat. Add some tests for QAEnvironment.
-rw-r--r--paludis/qa/Makefile.am.m410
-rw-r--r--paludis/qa/create_metadata_check.cc2
-rw-r--r--paludis/qa/dep_any_check.cc2
-rw-r--r--paludis/qa/dep_flags_check.cc2
-rw-r--r--paludis/qa/dep_packages_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/description_check.cc2
-rw-r--r--paludis/qa/ebuild_check.hh3
-rw-r--r--paludis/qa/extract_check.cc2
-rw-r--r--paludis/qa/files.m42
-rw-r--r--paludis/qa/homepage_check.cc2
-rw-r--r--paludis/qa/inherits_check.cc2
-rw-r--r--paludis/qa/iuse_check.cc2
-rw-r--r--paludis/qa/keywords_check.cc2
-rw-r--r--paludis/qa/license_check.cc2
-rw-r--r--paludis/qa/message.cc8
-rw-r--r--paludis/qa/message.hh2
-rw-r--r--paludis/qa/parse_deps_check.cc2
-rw-r--r--paludis/qa/pdepend_overlap_check.cc2
-rw-r--r--paludis/qa/qa_environment.cc (renamed from paludis/qa/environment.cc)57
-rw-r--r--paludis/qa/qa_environment.hh (renamed from paludis/qa/environment.hh)36
-rw-r--r--paludis/qa/qa_environment_TEST.cc60
-rwxr-xr-xpaludis/qa/qa_environment_TEST_cleanup.sh11
-rwxr-xr-xpaludis/qa/qa_environment_TEST_setup.sh33
-rw-r--r--paludis/qa/restrict_check.cc2
-rw-r--r--paludis/qa/slot_check.cc2
-rw-r--r--paludis/qa/src_uri_check.cc2
28 files changed, 167 insertions, 91 deletions
diff --git a/paludis/qa/Makefile.am.m4 b/paludis/qa/Makefile.am.m4
index 73dcf33..ca944c3 100644
--- a/paludis/qa/Makefile.am.m4
+++ b/paludis/qa/Makefile.am.m4
@@ -5,6 +5,7 @@ dnl vim: set ft=m4 noet :
define(`filelist', `')dnl
define(`testlist', `')dnl
+define(`headerlist', `')dnl
define(`srlist', `')dnl
define(`srcleanlist', `')dnl
define(`srheaderlist', `')dnl
@@ -21,7 +22,7 @@ $1_TEST_LDADD = \
$1_TEST_CXXFLAGS = -I$(top_srcdir)
')dnl
define(`addtestscript', `define(`testscriptlist', testscriptlist `$1_TEST_setup.sh $1_TEST_cleanup.sh')')dnl
-define(`addhh', `define(`filelist', filelist `$1.hh')')dnl
+define(`addhh', `define(`filelist', filelist `$1.hh')define(`headerlist', headerlist `$1.hh')')dnl
define(`addcc', `define(`filelist', filelist `$1.cc')')dnl
define(`addimpl', `define(`filelist', filelist `$1-impl.hh')')dnl
define(`addsr', `define(`srlist', srlist `$1.sr')dnl
@@ -54,7 +55,8 @@ libpaludisqa_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVIS
TESTS = testlist
TESTS_ENVIRONMENT = env \
- PALUDIS_EBUILD_DIR="$(srcdir)/ebuild/" \
+ PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
+ PALUDIS_SKIP_CONFIG="yes" \
PALUDIS_REPOSITORY_SO_DIR="$(top_builddir)/paludis/repositories" \
TEST_SCRIPT_DIR="$(srcdir)/" \
bash $(top_srcdir)/test/run_test.sh
@@ -62,6 +64,8 @@ TESTS_ENVIRONMENT = env \
check_PROGRAMS = $(TESTS)
check_SCRIPTS = testscriptlist
noinst_LTLIBRARIES = libpaludisqa.la
+paludis_qaincludedir = $(includedir)/paludis/qa/
+paludis_qainclude_HEADERS = headerlist srheaderlist
endif
@@ -74,7 +78,7 @@ qa.hh : qa.hh.m4 files.m4
CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
MAINTAINERCLEANFILES = Makefile.in Makefile.am qa.hh
DISTCLEANFILES = srcleanlist
-BUILT_SOURCES = srcleanlist
+BUILT_SOURCES = srcleanlist qa.hh
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
DEFS= \
-DSYSCONFDIR=\"$(sysconfdir)\" \
diff --git a/paludis/qa/create_metadata_check.cc b/paludis/qa/create_metadata_check.cc
index 6d5a6c1..30aebdb 100644
--- a/paludis/qa/create_metadata_check.cc
+++ b/paludis/qa/create_metadata_check.cc
@@ -19,6 +19,8 @@
#include <paludis/qa/create_metadata_check.hh>
#include <paludis/portage_dep_parser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/dep_any_check.cc b/paludis/qa/dep_any_check.cc
index 4cf8a61..c706853 100644
--- a/paludis/qa/dep_any_check.cc
+++ b/paludis/qa/dep_any_check.cc
@@ -21,6 +21,8 @@
#include <paludis/portage_dep_parser.hh>
#include <paludis/dep_atom.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/util/iterator.hh>
#include <paludis/util/save.hh>
diff --git a/paludis/qa/dep_flags_check.cc b/paludis/qa/dep_flags_check.cc
index 3fd89c0..ecbef3a 100644
--- a/paludis/qa/dep_flags_check.cc
+++ b/paludis/qa/dep_flags_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/dep_atom.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/dep_flags_check.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/paludis/qa/dep_packages_check.cc b/paludis/qa/dep_packages_check.cc
index b2aadc7..859c462 100644
--- a/paludis/qa/dep_packages_check.cc
+++ b/paludis/qa/dep_packages_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/dep_atom.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/dep_packages_check.hh>
#include <set>
diff --git a/paludis/qa/deps_exist_check.cc b/paludis/qa/deps_exist_check.cc
index f0c7472..0e05d7b 100644
--- a/paludis/qa/deps_exist_check.cc
+++ b/paludis/qa/deps_exist_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/dep_atom.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/deps_exist_check.hh>
#include <paludis/util/save.hh>
diff --git a/paludis/qa/deps_visible_check.cc b/paludis/qa/deps_visible_check.cc
index ac92262..9f36ef3 100644
--- a/paludis/qa/deps_visible_check.cc
+++ b/paludis/qa/deps_visible_check.cc
@@ -19,6 +19,8 @@
#include <paludis/qa/deps_visible_check.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/dep_atom.hh>
diff --git a/paludis/qa/description_check.cc b/paludis/qa/description_check.cc
index 8121c03..405e4d5 100644
--- a/paludis/qa/description_check.cc
+++ b/paludis/qa/description_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/qa/description_check.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <strings.h>
using namespace paludis;
diff --git a/paludis/qa/ebuild_check.hh b/paludis/qa/ebuild_check.hh
index 5190760..0b525f4 100644
--- a/paludis/qa/ebuild_check.hh
+++ b/paludis/qa/ebuild_check.hh
@@ -23,13 +23,14 @@
#include <paludis/name.hh>
#include <paludis/qa/check.hh>
#include <paludis/qa/check_result.hh>
-#include <paludis/qa/environment.hh>
#include <paludis/util/counted_ptr.hh>
#include <paludis/util/virtual_constructor.hh>
#include <paludis/version_spec.hh>
namespace paludis
{
+ class Environment;
+
namespace qa
{
diff --git a/paludis/qa/extract_check.cc b/paludis/qa/extract_check.cc
index eba9029..9181244 100644
--- a/paludis/qa/extract_check.cc
+++ b/paludis/qa/extract_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/dep_atom.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/portage_dep_parser.hh>
#include <paludis/qa/extract_check.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/paludis/qa/files.m4 b/paludis/qa/files.m4
index cfc0bf4..8288fe1 100644
--- a/paludis/qa/files.m4
+++ b/paludis/qa/files.m4
@@ -22,7 +22,6 @@ add(`description_check', `hh', `cc')
add(`digest_collisions_check', `hh', `cc')
add(`ebuild_check', `hh', `cc', `sr')
add(`ebuild_count_check', `hh', `cc')
-add(`environment', `hh', `cc')
add(`extract_check', `hh', `cc')
add(`file_check', `hh', `cc')
add(`filename_check', `hh', `cc')
@@ -41,6 +40,7 @@ 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')
+add(`qa_environment', `hh', `cc', `test', `testscript')
add(`restrict_check', `hh', `cc')
add(`src_uri_check', `hh', `cc')
add(`pdepend_overlap_check', `hh', `cc')
diff --git a/paludis/qa/homepage_check.cc b/paludis/qa/homepage_check.cc
index 342f794..da40563 100644
--- a/paludis/qa/homepage_check.cc
+++ b/paludis/qa/homepage_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/qa/homepage_check.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/inherits_check.cc b/paludis/qa/inherits_check.cc
index 72521ac..b50da92 100644
--- a/paludis/qa/inherits_check.cc
+++ b/paludis/qa/inherits_check.cc
@@ -19,6 +19,8 @@
#include <algorithm>
#include <iterator>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/qa/inherits_check.hh>
#include <paludis/util/join.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/paludis/qa/iuse_check.cc b/paludis/qa/iuse_check.cc
index de59c4d..9cdf757 100644
--- a/paludis/qa/iuse_check.cc
+++ b/paludis/qa/iuse_check.cc
@@ -20,6 +20,8 @@
#include <paludis/qa/iuse_check.hh>
#include <set>
#include <algorithm>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/util/join.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/paludis/qa/keywords_check.cc b/paludis/qa/keywords_check.cc
index 94c0d3d..2f37f01 100644
--- a/paludis/qa/keywords_check.cc
+++ b/paludis/qa/keywords_check.cc
@@ -19,6 +19,8 @@
#include <paludis/qa/keywords_check.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <set>
using namespace paludis;
diff --git a/paludis/qa/license_check.cc b/paludis/qa/license_check.cc
index 1ed53bf..f5576cc 100644
--- a/paludis/qa/license_check.cc
+++ b/paludis/qa/license_check.cc
@@ -19,6 +19,8 @@
#include <paludis/dep_atom.hh>
#include <paludis/portage_dep_parser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/qa/license_check.hh>
#include <paludis/util/tokeniser.hh>
diff --git a/paludis/qa/message.cc b/paludis/qa/message.cc
index 06c66ea..4878107 100644
--- a/paludis/qa/message.cc
+++ b/paludis/qa/message.cc
@@ -18,9 +18,17 @@
*/
#include <paludis/qa/message.hh>
+#include <ostream>
using namespace paludis;
using namespace paludis::qa;
#include <paludis/qa/message-sr.cc>
+std::ostream &
+paludis::qa::operator<< (std::ostream & s, const Message & m)
+{
+ s << "(" << m.level << ") " << m.msg;
+ return s;
+}
+
diff --git a/paludis/qa/message.hh b/paludis/qa/message.hh
index 5611295..202000a 100644
--- a/paludis/qa/message.hh
+++ b/paludis/qa/message.hh
@@ -21,6 +21,7 @@
#define PALUDIS_GUARD_PALUDIS_QA_MESSAGE_HH 1
#include <string>
+#include <iosfwd>
/** \file
* Declarations for the Message class.
@@ -44,6 +45,7 @@ namespace paludis
#include <paludis/qa/message-sr.hh>
+ std::ostream & operator<< (std::ostream &, const Message &);
}
}
diff --git a/paludis/qa/parse_deps_check.cc b/paludis/qa/parse_deps_check.cc
index df34ac6..b1ab737 100644
--- a/paludis/qa/parse_deps_check.cc
+++ b/paludis/qa/parse_deps_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/portage_dep_parser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/qa/parse_deps_check.hh>
using namespace paludis;
diff --git a/paludis/qa/pdepend_overlap_check.cc b/paludis/qa/pdepend_overlap_check.cc
index 8c1d2db..f6b9710 100644
--- a/paludis/qa/pdepend_overlap_check.cc
+++ b/paludis/qa/pdepend_overlap_check.cc
@@ -19,6 +19,8 @@
#include <paludis/dep_atom.hh>
#include <paludis/portage_dep_parser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/qa/pdepend_overlap_check.hh>
#include <paludis/util/join.hh>
#include <set>
diff --git a/paludis/qa/environment.cc b/paludis/qa/qa_environment.cc
index 44266f0..caaf5d1 100644
--- a/paludis/qa/environment.cc
+++ b/paludis/qa/qa_environment.cc
@@ -18,7 +18,8 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <paludis/qa/environment.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/qa/qa_environment.hh>
#include <paludis/util/collection_concrete.hh>
#include <map>
@@ -46,56 +47,10 @@ QAEnvironment::~QAEnvironment()
{
}
-bool
-QAEnvironment::query_use(const UseFlagName &, const PackageDatabaseEntry *) const
+std::string
+QAEnvironment::paludis_command() const
{
- return false;
-}
-
-bool
-QAEnvironment::accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const
-{
- return false;
-}
-
-bool
-QAEnvironment::accept_license(const std::string &, const PackageDatabaseEntry * const) const
-{
- return false;
-}
-
-bool
-QAEnvironment::query_user_masks(const PackageDatabaseEntry &) const
-{
- return false;
-}
-
-bool
-QAEnvironment::query_user_unmasks(const PackageDatabaseEntry &) const
-{
- return false;
-}
-
-namespace
-{
- static const std::multimap<std::string, std::string> qa_environment_mirrors;
-}
-
-QAEnvironment::MirrorIterator
-QAEnvironment::begin_mirrors(const std::string &) const
-{
- return MirrorIterator(qa_environment_mirrors.begin());
-}
-
-QAEnvironment::MirrorIterator
-QAEnvironment::end_mirrors(const std::string &) const
-{
- return MirrorIterator(qa_environment_mirrors.end());
-}
-
-UseFlagNameCollection::Pointer
-QAEnvironment::query_enabled_use_matching(const std::string &, const PackageDatabaseEntry *) const
-{
- return UseFlagNameCollection::Pointer(new UseFlagNameCollection::Concrete);
+ return "diefunc 'qa_environment.cc' 'QAEnvironment::paludis_command()' "
+ "'paludis_command called from within QAEnvironment'";
}
diff --git a/paludis/qa/environment.hh b/paludis/qa/qa_environment.hh
index f5fdbe9..a59dafe 100644
--- a/paludis/qa/environment.hh
+++ b/paludis/qa/qa_environment.hh
@@ -51,41 +51,7 @@ namespace paludis
~QAEnvironment();
- virtual bool query_use(const UseFlagName &, const PackageDatabaseEntry *) const;
-
- virtual bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
-
- virtual bool accept_license(const std::string &, const PackageDatabaseEntry * const) const;
-
- virtual bool query_user_masks(const PackageDatabaseEntry &) const;
-
- virtual bool query_user_unmasks(const PackageDatabaseEntry &) const;
-
- virtual std::string bashrc_files() const
- {
- return "";
- }
-
- virtual std::string hook_dirs() const
- {
- return "";
- }
-
- virtual std::string paludis_command() const PALUDIS_ATTRIBUTE((noreturn))
- {
- throw InternalError(PALUDIS_HERE, "Cannot use paludis_command in a QA environment");
- }
-
- virtual UseFlagNameCollection::Pointer query_enabled_use_matching(
- const std::string &, const PackageDatabaseEntry *) const;
-
- virtual MirrorIterator begin_mirrors(const std::string & mirror) const;
-
- virtual MirrorIterator end_mirrors(const std::string & mirror) const;
-
- virtual void perform_hook (const Hook &) const
- {
- }
+ virtual std::string paludis_command() const;
};
}
}
diff --git a/paludis/qa/qa_environment_TEST.cc b/paludis/qa/qa_environment_TEST.cc
new file mode 100644
index 0000000..9f2907c
--- /dev/null
+++ b/paludis/qa/qa_environment_TEST.cc
@@ -0,0 +1,60 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006 Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "qa_environment.hh"
+#include "check_result.hh"
+#include "file_check.hh"
+#include "create_metadata_check.hh"
+#include <paludis/util/fs_entry.hh>
+#include <test/test_framework.hh>
+#include <test/test_runner.hh>
+
+using namespace paludis;
+using namespace paludis::qa;
+using namespace test;
+
+namespace test_cases
+{
+ struct QAEnvironmentPaludisCommandTest : TestCase
+ {
+ QAEnvironmentPaludisCommandTest() : TestCase("paludis_command") { }
+
+ void run()
+ {
+ QAEnvironment env(FSEntry("qa_environment_TEST_dir/repo1"));
+
+ CheckResult r1((*(*EbuildCheckMaker::get_instance()->find_maker(
+ CreateMetadataCheck::identifier()))())(EbuildCheckData(
+ QualifiedPackageName("cat-one/pkg-one"), VersionSpec("1"), &env)));
+ {
+ TestMessageSuffix suffix("r1=" + join(r1.begin(), r1.end(), "; "), false);
+ TEST_CHECK(r1.empty());
+ }
+
+ CheckResult r2((*(*EbuildCheckMaker::get_instance()->find_maker(
+ CreateMetadataCheck::identifier()))())(EbuildCheckData(
+ QualifiedPackageName("cat-one/pkg-one"), VersionSpec("2"), &env)));
+ {
+ TestMessageSuffix suffix("r2=" + join(r2.begin(), r2.end(), "; "), false);
+ TEST_CHECK(! r2.empty());
+ }
+ }
+ } qa_environment_paludis_command_test;
+}
+
diff --git a/paludis/qa/qa_environment_TEST_cleanup.sh b/paludis/qa/qa_environment_TEST_cleanup.sh
new file mode 100755
index 0000000..02ed13f
--- /dev/null
+++ b/paludis/qa/qa_environment_TEST_cleanup.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# vim: set ft=sh sw=4 sts=4 et :
+
+if [ -d qa_environment_TEST_dir ] ; then
+ rm -fr qa_environment_TEST_dir
+else
+ true
+fi
+
+
+
diff --git a/paludis/qa/qa_environment_TEST_setup.sh b/paludis/qa/qa_environment_TEST_setup.sh
new file mode 100755
index 0000000..b13b5ce
--- /dev/null
+++ b/paludis/qa/qa_environment_TEST_setup.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# vim: set ft=sh sw=4 sts=4 et :
+
+mkdir qa_environment_TEST_dir || exit 1
+cd qa_environment_TEST_dir || exit 1
+
+mkdir -p repo1/{eclass,distfiles,profiles/profile} || exit 1
+cd repo1 || exit 1
+echo "test-repo-1" > profiles/repo_name || exit 1
+cat <<END > profiles/categories || exit 1
+cat-one
+cat-two
+cat-three
+END
+cat <<END > profiles/profile/make.defaults
+ARCH=test
+END
+mkdir -p cat-one/pkg-one
+cat <<END > cat-one/pkg-one/pkg-one-1.ebuild
+DESCRIPTION="foo"
+SLOT="foo"
+END
+cat <<END > cat-one/pkg-one/pkg-one-2.ebuild
+DESCRIPTION="foo"
+if has_version foo ; then
+ SLOT="foo"
+else
+ SLOT="bar"
+fi
+END
+
+cd ..
+
diff --git a/paludis/qa/restrict_check.cc b/paludis/qa/restrict_check.cc
index 16afdd1..b45dd8d 100644
--- a/paludis/qa/restrict_check.cc
+++ b/paludis/qa/restrict_check.cc
@@ -21,6 +21,8 @@
#include <iterator>
#include <paludis/qa/restrict_check.hh>
#include <paludis/util/tokeniser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <set>
using namespace paludis;
diff --git a/paludis/qa/slot_check.cc b/paludis/qa/slot_check.cc
index f117279..8c9a005 100644
--- a/paludis/qa/slot_check.cc
+++ b/paludis/qa/slot_check.cc
@@ -18,6 +18,8 @@
*/
#include <paludis/qa/slot_check.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
using namespace paludis;
using namespace paludis::qa;
diff --git a/paludis/qa/src_uri_check.cc b/paludis/qa/src_uri_check.cc
index 61dcbe7..1698c9a 100644
--- a/paludis/qa/src_uri_check.cc
+++ b/paludis/qa/src_uri_check.cc
@@ -19,6 +19,8 @@
#include <paludis/dep_atom.hh>
#include <paludis/portage_dep_parser.hh>
+#include <paludis/package_database_entry.hh>
+#include <paludis/environment.hh>
#include <paludis/qa/src_uri_check.hh>
#include <paludis/util/tokeniser.hh>
#include <set>