aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-07 08:17:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-03-07 08:17:28 +0000
commitbcffd6cca1142cfb02daff9e0dd7456143306b55 (patch)
tree530ec1401e5441889fe4d9f9ef9f53cff2673c68
parent09d50668dc1809839f506d8447b3aaef296b8152 (diff)
downloadpaludis-bcffd6cca1142cfb02daff9e0dd7456143306b55.tar.gz
paludis-bcffd6cca1142cfb02daff9e0dd7456143306b55.tar.xz
Fix up some of the small todo items
-rw-r--r--paludis/dep_list.cc1
-rw-r--r--paludis/dep_parser.cc1
-rw-r--r--paludis/qa/metadata_check.cc3
-rw-r--r--paludis/test_environment.cc3
-rw-r--r--paludis/version_metadata.cc25
5 files changed, 25 insertions, 8 deletions
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 1ffd771..ea9c179 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -379,7 +379,6 @@ DepList::visit(const PackageDepAtom * const p)
false, false, false)));
/* if we provide things, also insert them. */
- /// \bug PROVIDE can contain use? blocks.
if (! metadata->get(vmk_provide).empty())
{
DepAtom::ConstPointer provide(DepParser::parse(metadata->get(vmk_provide),
diff --git a/paludis/dep_parser.cc b/paludis/dep_parser.cc
index c85c638..256cbb8 100644
--- a/paludis/dep_parser.cc
+++ b/paludis/dep_parser.cc
@@ -76,7 +76,6 @@ DepParser::parse(const std::string & s, const DepParserPolicyInterface * const p
continue;
case dpl_text:
- /// \bug VV policy
{
if (i->second.empty())
throw DepStringParseError(i->second, "Empty text entry");
diff --git a/paludis/qa/metadata_check.cc b/paludis/qa/metadata_check.cc
index 5920760..97ad213 100644
--- a/paludis/qa/metadata_check.cc
+++ b/paludis/qa/metadata_check.cc
@@ -69,8 +69,7 @@ MetadataCheck::operator() (const FSEntry & f) const
}
PStream xmllint("xmllint --noout --nonet --dtdvalid '"
- + stringify(dtd) + /// \bug << todo
- "' '" + stringify(f) + "' 2>&1");
+ + stringify(dtd) + "' '" + stringify(f) + "' 2>&1");
std::string s;
while (std::getline(xmllint, s))
diff --git a/paludis/test_environment.cc b/paludis/test_environment.cc
index 0de1ab2..81d47dc 100644
--- a/paludis/test_environment.cc
+++ b/paludis/test_environment.cc
@@ -36,21 +36,18 @@ TestEnvironment::query_use(const UseFlagName & u, const PackageDatabaseEntry *)
bool
TestEnvironment::accept_keyword(const KeywordName & k, const PackageDatabaseEntry * const) const
{
- /// \todo
return k == KeywordName("test");
}
bool
TestEnvironment::query_user_masks(const PackageDatabaseEntry &) const
{
- /// \todo?
return false;
}
bool
TestEnvironment::query_user_unmasks(const PackageDatabaseEntry &) const
{
- /// \todo?
return false;
}
diff --git a/paludis/version_metadata.cc b/paludis/version_metadata.cc
index a100b3a..08692bf 100644
--- a/paludis/version_metadata.cc
+++ b/paludis/version_metadata.cc
@@ -78,14 +78,37 @@ VersionMetadata::~VersionMetadata()
const std::string &
VersionMetadata::get(const VersionMetadataKey key) const
{
- /// \bug check key
+ if (key < 0 || key >= static_cast<int>(_implementation->values.size()))
+ throw InternalError(PALUDIS_HERE, "Bad value for key");
return _implementation->values[key];
}
VersionMetadata &
VersionMetadata::set(const VersionMetadataKey key, const std::string & value)
{
+ if (key < 0 || key >= static_cast<int>(_implementation->values.size()))
+ throw InternalError(PALUDIS_HERE, "Bad value for key");
+
_implementation->values[key] = value;
+
+ switch (key)
+ {
+ case vmk_iuse:
+ _implementation->iuse.clear();
+ break;
+
+ case vmk_keywords:
+ _implementation->keywords.clear();
+ break;
+
+ case vmk_provide:
+ _implementation->provide.clear();
+ break;
+
+ default:
+ break;
+ }
+
return *this;
}