aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-29 19:43:26 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-29 19:43:26 +0000
commit08624c5bb5c1e1405021c45fdfce30f2fe12c65c (patch)
tree812fcd55d6f51d3f9ebca32d54f2d341b403e144
parent9a9bc0aaf28d2c8aa3f1453f645f5382506b4cca (diff)
downloadpaludis-08624c5bb5c1e1405021c45fdfce30f2fe12c65c.tar.gz
paludis-08624c5bb5c1e1405021c45fdfce30f2fe12c65c.tar.xz
version_metadata now throws rather than returning a dummy entry for packages that don't exist
-rw-r--r--paludis/repositories/portage/portage_repository.cc8
-rw-r--r--paludis/repositories/vdb/vdb_repository.cc7
2 files changed, 2 insertions, 13 deletions
diff --git a/paludis/repositories/portage/portage_repository.cc b/paludis/repositories/portage/portage_repository.cc
index 399aa66..f81ee82 100644
--- a/paludis/repositories/portage/portage_repository.cc
+++ b/paludis/repositories/portage/portage_repository.cc
@@ -561,13 +561,7 @@ PortageRepository::do_version_metadata(
"-" + stringify(v) + "':");
if (! has_version(q, v))
- {
- Log::get_instance()->message(ll_warning, lc_context, "has_version failed for request for '" +
- stringify(q) + "-" + stringify(v) + "' in repository '" +
- stringify(name()) + "'");
- return VersionMetadata::ConstPointer(new VersionMetadata::Ebuild(
- PortageDepParser::parse_depend));
- }
+ throw NoSuchPackageError(stringify(PackageDatabaseEntry(q, v, name())));
VersionMetadata::Pointer result(_imp->entries_ptr->generate_version_metadata(q, v));
_imp->metadata.insert(std::make_pair(std::make_pair(q, v), result));
diff --git a/paludis/repositories/vdb/vdb_repository.cc b/paludis/repositories/vdb/vdb_repository.cc
index 7de78b8..d029534 100644
--- a/paludis/repositories/vdb/vdb_repository.cc
+++ b/paludis/repositories/vdb/vdb_repository.cc
@@ -533,12 +533,7 @@ VDBRepository::do_version_metadata(
q, v), VDBEntry::CompareVersion()));
if (r.first == r.second)
- {
- Log::get_instance()->message(ll_warning, lc_context, "version lookup failed for request for '" +
- stringify(q) + "-" + stringify(v) + "' in repository '" +
- stringify(name()) + "'");
- return VersionMetadata::ConstPointer(new VersionMetadata(&PortageDepParser::parse_depend));
- }
+ throw NoSuchPackageError(stringify(PackageDatabaseEntry(q, v, name())));
else
{
if (! r.first->metadata)