aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-19 11:13:20 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-19 11:13:20 +0000
commit8a77982728fde312ba56e6b6ffd899a29716e54c (patch)
tree4760246d5e3b8f165f5fee4de2500283de0921e6
parent60ea99ee00f81839109124bc3d36fbd86114e42c (diff)
downloadpaludis-8a77982728fde312ba56e6b6ffd899a29716e54c.tar.gz
paludis-8a77982728fde312ba56e6b6ffd899a29716e54c.tar.xz
Checks tinkering
-rw-r--r--paludis/qa/dep_packages_check.cc (renamed from paludis/qa/rdepend_packages_check.cc)46
-rw-r--r--paludis/qa/dep_packages_check.hh (renamed from paludis/qa/rdepend_packages_check.hh)14
-rw-r--r--paludis/qa/files.m42
-rw-r--r--paludis/qa/src_uri_check.cc2
4 files changed, 38 insertions, 26 deletions
diff --git a/paludis/qa/rdepend_packages_check.cc b/paludis/qa/dep_packages_check.cc
index 8ef8d79..7c86f4a 100644
--- a/paludis/qa/rdepend_packages_check.cc
+++ b/paludis/qa/dep_packages_check.cc
@@ -17,7 +17,7 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "rdepend_packages_check.hh"
+#include "dep_packages_check.hh"
#include <paludis/dep_parser.hh>
#include <paludis/dep_atom.hh>
@@ -68,12 +68,12 @@ namespace
};
}
-RdependPackagesCheck::RdependPackagesCheck()
+DepPackagesCheck::DepPackagesCheck()
{
}
CheckResult
-RdependPackagesCheck::operator() (const EbuildCheckData & e) const
+DepPackagesCheck::operator() (const EbuildCheckData & e) const
{
CheckResult result(stringify(e.get<ecd_name>()) + "-" + stringify(e.get<ecd_version>()),
identifier());
@@ -85,22 +85,32 @@ RdependPackagesCheck::operator() (const EbuildCheckData & e) const
VersionMetadata::ConstPointer metadata(
e.get<ecd_environment>()->package_database()->fetch_metadata(ee));
- static std::set<QualifiedPackageName> suspicious;
- if (suspicious.empty())
+ static std::set<QualifiedPackageName> suspicious_depend;
+ if (suspicious_depend.empty())
{
- suspicious.insert(QualifiedPackageName("app-arch/rpm2targz"));
- suspicious.insert(QualifiedPackageName("app-arch/unzip"));
- suspicious.insert(QualifiedPackageName("dev-util/pkgconfig"));
- suspicious.insert(QualifiedPackageName("sys-devel/autoconf"));
- suspicious.insert(QualifiedPackageName("sys-devel/automake"));
- suspicious.insert(QualifiedPackageName("sys-devel/flex"));
- suspicious.insert(QualifiedPackageName("sys-devel/gettext"));
- suspicious.insert(QualifiedPackageName("sys-devel/libtool"));
- suspicious.insert(QualifiedPackageName("sys-devel/patch"));
- suspicious.insert(QualifiedPackageName("app-doc/doxygen"));
+ suspicious_depend.insert(QualifiedPackageName("vitrual/libc"));
}
- Checker rdepend_checker(result, "RDEPEND", suspicious);
+ Checker depend_checker(result, "DEPEND", suspicious_depend);
+ std::string depend(metadata->get(vmk_depend));
+ DepParser::parse(depend)->accept(&depend_checker);
+
+ static std::set<QualifiedPackageName> suspicious_rdepend;
+ if (suspicious_rdepend.empty())
+ {
+ suspicious_rdepend.insert(QualifiedPackageName("app-arch/rpm2targz"));
+ suspicious_rdepend.insert(QualifiedPackageName("app-arch/unzip"));
+ suspicious_rdepend.insert(QualifiedPackageName("dev-util/pkgconfig"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/autoconf"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/automake"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/flex"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/gettext"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/libtool"));
+ suspicious_rdepend.insert(QualifiedPackageName("sys-devel/patch"));
+ suspicious_rdepend.insert(QualifiedPackageName("app-doc/doxygen"));
+ }
+
+ Checker rdepend_checker(result, "RDEPEND", suspicious_rdepend);
std::string rdepend(metadata->get(vmk_rdepend));
DepParser::parse(rdepend)->accept(&rdepend_checker);
}
@@ -118,9 +128,9 @@ RdependPackagesCheck::operator() (const EbuildCheckData & e) const
}
const std::string &
-RdependPackagesCheck::identifier()
+DepPackagesCheck::identifier()
{
- static const std::string id("rdepend packages");
+ static const std::string id("depend packages");
return id;
}
diff --git a/paludis/qa/rdepend_packages_check.hh b/paludis/qa/dep_packages_check.hh
index 11f97dc..824946e 100644
--- a/paludis/qa/rdepend_packages_check.hh
+++ b/paludis/qa/dep_packages_check.hh
@@ -17,8 +17,8 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef PALUDIS_GUARD_PALUDIS_QA_RDEPEND_PACKAGES_CHECK_HH
-#define PALUDIS_GUARD_PALUDIS_QA_RDEPEND_PACKAGES_CHECK_HH 1
+#ifndef PALUDIS_GUARD_PALUDIS_QA_DEP_PACKAGES_CHECK_HH
+#define PALUDIS_GUARD_PALUDIS_QA_DEP_PACKAGES_CHECK_HH 1
#include <paludis/qa/ebuild_check.hh>
#include <string>
@@ -27,11 +27,11 @@ namespace paludis
{
namespace qa
{
- class RdependPackagesCheck :
+ class DepPackagesCheck :
public EbuildCheck
{
public:
- RdependPackagesCheck();
+ DepPackagesCheck();
CheckResult operator() (const EbuildCheckData &) const;
@@ -39,12 +39,12 @@ namespace paludis
virtual std::string describe() const
{
- return "Checks packages that usually should not be in RDEPEND";
+ return "Checks for packages that usually should not be in *DEPEND";
}
};
- static const EbuildCheckMaker::RegisterMaker register_rdepend_packages_check(
- RdependPackagesCheck::identifier(), &MakeEbuildCheck<RdependPackagesCheck>::make_ebuild_check);
+ static const EbuildCheckMaker::RegisterMaker register_dep_packages_check(
+ DepPackagesCheck::identifier(), &MakeEbuildCheck<DepPackagesCheck>::make_ebuild_check);
}
}
diff --git a/paludis/qa/files.m4 b/paludis/qa/files.m4
index b1d1094..9578e5d 100644
--- a/paludis/qa/files.m4
+++ b/paludis/qa/files.m4
@@ -14,6 +14,7 @@ add(`check_result', `hh', `cc', `test')
add(`create_metadata_check', `hh', `cc')
add(`dep_any_check', `hh', `cc')
add(`dep_flags_check', `hh', `cc')
+add(`dep_packages_check', `hh', `cc')
add(`deps_exist_check', `hh', `cc')
add(`deps_visible_check', `hh', `cc')
add(`description_check', `hh', `cc')
@@ -36,7 +37,6 @@ 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(`rdepend_packages_check', `hh', `cc')
add(`restrict_check', `hh', `cc')
add(`src_uri_check', `hh', `cc')
add(`pdepend_overlap_check', `hh', `cc')
diff --git a/paludis/qa/src_uri_check.cc b/paludis/qa/src_uri_check.cc
index 0e6bb90..12501a9 100644
--- a/paludis/qa/src_uri_check.cc
+++ b/paludis/qa/src_uri_check.cc
@@ -60,6 +60,8 @@ namespace
(std::string::npos != a->text().find("cvs.gentoo.org")) ||
(std::string::npos != a->text().find("toucan.gentoo.org")) ||
(std::string::npos != a->text().find("emu.gentoo.org")) ||
+ (std::string::npos != a->text().find("berlios.de")) ||
+ (std::string::npos != a->text().find("alpha.gnu.org")) ||
(std::string::npos != a->text().find("geocities.com")))
result << Message(qal_major, "Unreliable host for '" + a->text() + "'");
}