aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-29 11:19:19 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-11-29 11:19:19 +0000
commitcf6d968d41dd96fe01f3acc5f43644c8078860ac (patch)
treef32bd9a187c9390ae898c15df03060ee3726a2e7
parent17c858f31aac574d1cbf7d50705d544db8062bc9 (diff)
downloadpaludis-cf6d968d41dd96fe01f3acc5f43644c8078860ac.tar.gz
paludis-cf6d968d41dd96fe01f3acc5f43644c8078860ac.tar.xz
Include installed time in query output
-rw-r--r--src/paludis/query.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/paludis/query.cc b/src/paludis/query.cc
index 0821f4f..38f53a5 100644
--- a/src/paludis/query.cc
+++ b/src/paludis/query.cc
@@ -212,6 +212,21 @@ void do_one_package_query(
cout << " " << std::setw(22) << std::left << "SRC_REPOSITORY:" << std::setw(0) <<
" " << metadata->get_ebin_interface()->src_repository << endl;
}
+
+ if (metadata->origins.source)
+ cout << " " << std::setw(22) << std::left << "SOURCE_ORIGIN:" << std::setw(0)
+ << " " << *metadata->origins.source << endl;
+ if (metadata->origins.binary)
+ cout << " " << std::setw(22) << std::left << "BINARY_ORIGIN::" << std::setw(0)
+ << " " << *metadata->origins.binary << endl;
+ if (0 != env->package_database()->fetch_repository(display_entry.repository)->installed_interface)
+ {
+ time_t t(env->package_database()->fetch_repository(display_entry.repository
+ )->installed_interface->installed_time(display_entry.name, display_entry.version));
+ if (0 != t)
+ cout << " " << std::setw(22) << std::left << "INSTALLED_TIME:" << std::setw(0)
+ << " " << t << endl;
+ }
}
else
{
@@ -264,6 +279,18 @@ void do_one_package_query(
if (metadata->origins.binary)
cout << " " << std::setw(22) << std::left << "Binary origin:" << std::setw(0)
<< " " << colour(cl_package_name, *metadata->origins.binary) << endl;
+ if (0 != env->package_database()->fetch_repository(display_entry.repository)->installed_interface)
+ {
+ time_t t(env->package_database()->fetch_repository(display_entry.repository
+ )->installed_interface->installed_time(display_entry.name, display_entry.version));
+ if (0 != t)
+ {
+ char buf[255];
+ if (strftime(buf, 254, "%c", localtime(&t)))
+ cout << " " << std::setw(22) << std::left << "Installed time:" << std::setw(0)
+ << " " << buf << endl;
+ }
+ }
if (metadata->get_ebuild_interface())
{