]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wanna-build
Give nomeata wb_all access.
[wannabuild.git] / bin / wanna-build
index 5570662d06438b65a7d85c82e451f587aeffc26e..53c206fb2a88ba290760822a460387054877c39b 100755 (executable)
@@ -1900,6 +1900,7 @@ R max time of last (successful) build (formated)
 S Package state
 s Time in this state in full seconds since epoch
 t time of state change
+T time since state change
 u Builder (e.g. buildd_mipsel-rem)
 v Package version
 V full Package version (i.e. with +b.., = %v%{+b}B%B
@@ -1943,6 +1944,7 @@ Text could contain further %. To start with !, use %!
         'B' => make_fmt( sub { return $pkg->{'binary_nmu_version'} if defined $pkg->{'binary_nmu_version'}; }, $pkg, $var),
         'd' => make_fmt( $pkg->{'distribution'}, $pkg, $var),
         't' => make_fmt( $pkg->{'state_change'}, $pkg, $var),
+        'T' => make_fmt( sub { return seconds2time(time() - floor(str2time($pkg->{'state_change'}))); }, $pkg, $var),
         'o' => make_fmt( $pkg->{'successtime'}, $pkg, $var),
         'O' => make_fmt( sub { return seconds2time ( $pkg->{'successtime'}); }, $pkg, $var),
         'q' => make_fmt( $pkg->{'anytime'}, $pkg, $var),
@@ -2566,11 +2568,10 @@ sub get_all_source_info {
                push @args, uc($options{state});
        }
 
-       if ($options{user}) {
+       if ($options{user} && uc($options{state}) ne "NEEDS-BUILD") { # if it's NEEDS-BUILD, we don't look at users
                #this basically means "this user, or no user at all":
-               $q .= ' AND (builder = ? OR upper(state) = ?)';
+               $q .= " AND (builder = ? OR upper(state) = 'NEEDS-BUILD')";
                push @args, $options{user};
-               push @args, "NEEDS-BUILD";
        }
 
        if ($options{category}) {