aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc5
-rw-r--r--src/clients/inquisitio/key_extractor.cc5
-rw-r--r--src/clients/instruo/instruo.cc5
-rw-r--r--src/clients/paludis/applets.cc5
-rw-r--r--src/clients/paludis/info.cc5
-rw-r--r--src/clients/qualudis/qualudis.cc5
-rw-r--r--src/output/console_install_task.cc23
-rw-r--r--src/output/console_install_task.hh1
-rw-r--r--src/output/console_query_task.cc17
-rw-r--r--src/output/mask_displayer.cc5
10 files changed, 76 insertions, 0 deletions
diff --git a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
index 155cd6223..bf154ee6d 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/version_info_model.cc
@@ -174,6 +174,11 @@ namespace gtkpaludis
got_key(k, markup_escape(stringify(k.value())));
}
+ void visit(const MetadataSizeKey & k)
+ {
+ got_key(k, markup_escape(stringify(k.value())));
+ }
+
void visit(const MetadataTimeKey & k)
{
char buf[255];
diff --git a/src/clients/inquisitio/key_extractor.cc b/src/clients/inquisitio/key_extractor.cc
index ccdfa74dd..250d59855 100644
--- a/src/clients/inquisitio/key_extractor.cc
+++ b/src/clients/inquisitio/key_extractor.cc
@@ -202,6 +202,11 @@ namespace
result = _m(s.value());
}
+ void visit(const MetadataSizeKey & s)
+ {
+ result = _m(stringify(s.value()));
+ }
+
void visit(const MetadataTimeKey & s)
{
result = _m(stringify(s.value()));
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 231a169b7..1813f3da0 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -55,6 +55,11 @@ namespace
const std::string & PALUDIS_ATTRIBUTE((unused)) s(k.value());
}
+ void visit(const MetadataSizeKey & k)
+ {
+ long PALUDIS_ATTRIBUTE((unused)) t(k.value());
+ }
+
void visit(const MetadataPackageIDKey & k)
{
const tr1::shared_ptr<const PackageID> & PALUDIS_ATTRIBUTE((unused)) p(k.value());
diff --git a/src/clients/paludis/applets.cc b/src/clients/paludis/applets.cc
index 5c32a1a88..f439113c6 100644
--- a/src/clients/paludis/applets.cc
+++ b/src/clients/paludis/applets.cc
@@ -57,6 +57,11 @@ namespace
std::cout << k.value() << std::endl;
}
+ void visit(const MetadataSizeKey & k)
+ {
+ std::cout << k.value() << std::endl;
+ }
+
void visit(const MetadataFSEntryKey & k)
{
std::cout << k.value() << std::endl;
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 3ae98fb47..7bc2696a0 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -82,6 +82,11 @@ namespace
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
}
+ void visit(const MetadataSizeKey & k)
+ {
+ cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
+ }
+
void visit(const MetadataFSEntryKey & k)
{
cout << std::setw(30) << (indent + k.human_name() + ":") << " " << k.value() << endl;
diff --git a/src/clients/qualudis/qualudis.cc b/src/clients/qualudis/qualudis.cc
index 37b6e50b4..eae8324c3 100644
--- a/src/clients/qualudis/qualudis.cc
+++ b/src/clients/qualudis/qualudis.cc
@@ -130,6 +130,11 @@ namespace
stream << k.raw_name() << ": " << k.value() << "\n";
}
+ void visit(const MetadataSizeKey & k)
+ {
+ stream << k.raw_name() << ": " << k.value() << "\n";
+ }
+
void visit(const MetadataTimeKey & k)
{
stream << k.raw_name() << ": " << k.value() << "\n";
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 84b15eb73..9de4e6cb6 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -370,6 +370,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
display_merge_list_entry_package_tags(d, m);
display_merge_list_entry_description(d, existing_repo, existing_slot_repo, m);
display_merge_list_entry_use(d, existing_repo, existing_slot_repo, m);
+ display_merge_list_entry_distsize(d, m);
if (want_compact())
display_merge_list_entry_package_tags(d, m);
display_merge_list_entry_end(d, m);
@@ -1158,6 +1159,28 @@ ConsoleInstallTask::display_merge_list_entry_use(const DepListEntry & d,
}
void
+ConsoleInstallTask::display_merge_list_entry_distsize(const DepListEntry & d,
+ const DisplayMode m)
+{
+ if (normal_entry != m && suggested_entry != m)
+ return;
+
+ if (! d.package_id->size_of_download_required_key() || d.package_id->size_of_download_required_key()->value() == 0)
+ return;
+
+ if (want_compact())
+ output_no_endl(" ");
+ else
+ {
+ output_endl();
+ output_no_endl(" ");
+ }
+
+ output_stream() << d.package_id->size_of_download_required_key()->pretty_print()
+ << " to download";
+}
+
+void
ConsoleInstallTask::display_merge_list_entry_non_package_tags(const DepListEntry & d, const DisplayMode m)
{
if (d.tags->empty())
diff --git a/src/output/console_install_task.hh b/src/output/console_install_task.hh
index f18ed8644..cb80ac6a6 100644
--- a/src/output/console_install_task.hh
+++ b/src/output/console_install_task.hh
@@ -226,6 +226,7 @@ namespace paludis
virtual void display_merge_list_entry_use(const DepListEntry &,
tr1::shared_ptr<const PackageIDSequence>,
tr1::shared_ptr<const PackageIDSequence>, const DisplayMode);
+ virtual void display_merge_list_entry_distsize(const DepListEntry &, const DisplayMode);
virtual void display_merge_list_entry_non_package_tags(const DepListEntry &, const DisplayMode);
virtual void display_merge_list_entry_package_tags(const DepListEntry &, const DisplayMode);
virtual void display_merge_list_entry_end(const DepListEntry &, const DisplayMode);
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index 50e0c2238..dbd0d7f3b 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -519,6 +519,23 @@ namespace
}
}
+ void visit(const MetadataSizeKey & k)
+ {
+ if (k.type() == type)
+ {
+ if (task->want_raw())
+ {
+ task->output_left_column(k.raw_name() + ":", in);
+ task->output_right_column(stringify(k.value()));
+ }
+ else
+ {
+ task->output_left_column(k.human_name() + ":", in);
+ task->output_right_column(k.pretty_print());
+ }
+ }
+ }
+
void visit(const MetadataSectionKey & k)
{
if (k.type() == type)
diff --git a/src/output/mask_displayer.cc b/src/output/mask_displayer.cc
index a1d0e4988..7e4c83fd2 100644
--- a/src/output/mask_displayer.cc
+++ b/src/output/mask_displayer.cc
@@ -69,6 +69,11 @@ namespace
s << k.value();
}
+ void visit(const MetadataSizeKey & k)
+ {
+ s << k.value();
+ }
+
void visit(const MetadataSectionKey & k)
{
s << "(";