aboutsummaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-12-02 00:45:40 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-12-02 00:45:40 +0000
commit1c22d3e80fc3c4cd50e163fc2ae9f0f75de6db1a (patch)
tree306f97b9a1d8e7f5d24e674bb1e1ff623bd52402 /src/output
parentcfde917750de96cf0c5d660f87e0e8e514b20cc0 (diff)
downloadpaludis-1c22d3e80fc3c4cd50e163fc2ae9f0f75de6db1a.tar.gz
paludis-1c22d3e80fc3c4cd50e163fc2ae9f0f75de6db1a.tar.xz
Abstractify PackageDepSpec, to allow repositories to display deps in their native formats. Fixes: ticket:333
Diffstat (limited to 'src/output')
-rw-r--r--src/output/console_install_task.cc22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index bd19fcf7e..03100bb78 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -343,25 +343,15 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
repo.reset(new RepositoryName(d.destination->name()));
tr1::shared_ptr<const PackageIDSequence> existing_repo(environment()->package_database()->
- query(query::Matches(PackageDepSpec(
- tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(d.package_id->name())),
- tr1::shared_ptr<CategoryNamePart>(),
- tr1::shared_ptr<PackageNamePart>(),
- tr1::shared_ptr<VersionRequirements>(),
- vr_and,
- tr1::shared_ptr<SlotName>(),
- repo)),
+ query(query::Matches(repo ?
+ make_package_dep_spec().package(d.package_id->name()).repository(*repo) :
+ make_package_dep_spec().package(d.package_id->name())),
qo_order_by_version));
tr1::shared_ptr<const PackageIDSequence> existing_slot_repo(environment()->package_database()->
- query(query::Matches(PackageDepSpec(
- tr1::shared_ptr<QualifiedPackageName>(new QualifiedPackageName(d.package_id->name())),
- tr1::shared_ptr<CategoryNamePart>(),
- tr1::shared_ptr<PackageNamePart>(),
- tr1::shared_ptr<VersionRequirements>(),
- vr_and,
- tr1::shared_ptr<SlotName>(new SlotName(d.package_id->slot())),
- repo)),
+ query(query::Matches(repo ?
+ make_package_dep_spec().package(d.package_id->name()).slot(d.package_id->slot()).repository(*repo) :
+ make_package_dep_spec().package(d.package_id->name()).slot(d.package_id->slot())),
qo_order_by_version));
display_merge_list_entry_start(d, m);