aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-01 20:01:13 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-01 20:01:13 +0000
commit76f0e38a98ee6da7d7b80466eebf0d1817c23858 (patch)
tree6d218b4d75804a4601d9318123a6dbac8f4349b6
parente35134bc5eecaab91303503c209423df73ffad82 (diff)
downloadpaludis-76f0e38a98ee6da7d7b80466eebf0d1817c23858.tar.gz
paludis-76f0e38a98ee6da7d7b80466eebf0d1817c23858.tar.xz
Sort of fix the non default virtual issue
-rw-r--r--paludis/portage_repository.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index d6144a5..29a676c 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -898,11 +898,21 @@ PortageRepository::do_is_mirror(const std::string & s) const
void
PortageRepository::do_install(const QualifiedPackageName & q, const VersionSpec & v) const
{
+ VersionMetadata::ConstPointer metadata(0);
if (! has_version(q, v))
- throw InternalError(PALUDIS_HERE, "Can't install '" + stringify(q) + "-"
- + stringify(v) + "' since has_version failed"); /// \todo fixme
-
- VersionMetadata::ConstPointer metadata(version_metadata(q, v));
+ {
+ if (q.get<qpn_category>() == CategoryNamePart("virtual"))
+ {
+ VersionMetadata::Pointer m(new VersionMetadata);
+ m->set(vmk_virtual, " ");
+ metadata = m;
+ }
+ else
+ throw InternalError(PALUDIS_HERE, "Can't install '" + stringify(q) + "-"
+ + stringify(v) + "' since has_version failed"); /// \todo fixme
+ }
+ else
+ metadata = version_metadata(q, v);
std::string archives, flat_src_uri;
{