From 07e535de654c70510ec6a6bae4cf9f2613e5ed87 Mon Sep 17 00:00:00 2001 From: Andreas Barth Date: Sun, 28 Feb 2010 17:47:25 +0000 Subject: [PATCH] add "previous state left" to list -v --- bin/wanna-build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/wanna-build b/bin/wanna-build index 3f76660..2541de5 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -1887,6 +1887,8 @@ sub list_packages { print " Previous state was $pkg->{'previous_state'} until ", "$pkg->{'state_change'}\n" if $verbose && $pkg->{'previous_state'}; + print " Previous state left $pkg->{'state_time'} ago\n" + if $verbose && $pkg->{'state_time'}; print " No previous state recorded\n" if $verbose && !$pkg->{'previous_state'}; print " Previous failing reasons:\n ", @@ -2414,7 +2416,10 @@ sub get_source_info { sub get_all_source_info { my %options = @_; - my $q = 'SELECT *, extract(days from date_trunc(\'days\', now() - state_change::timestamp)) as state_days FROM ' . table_name() + my $q = 'SELECT *, '. + 'extract(days from date_trunc(\'days\', now() - state_change::timestamp)) as state_days, '. + 'date_trunc(\'seconds\', now() - state_change::timestamp) as state_time'. + ' FROM ' . table_name() . ' WHERE distribution = ? '; my @args = ($distribution); if ($options{state} && uc($options{state}) ne "ALL") { -- 2.39.5