Forgot the patch, here it is.
diff --git a/bin/buildd-vlog b/bin/buildd-vlog
index ec6bbbb..0b00c33 100755
--- a/bin/buildd-vlog
+++ b/bin/buildd-vlog
@@ -49,7 +49,15 @@ while( 1 ) {
        } while (!($curr_pkg = read_progress()));
     }
 
+    print("package '$curr_pkg'\n");
+
     my $logf = newest_log( "$logpath/${curr_pkg}*" );
+
+    if ($logf eq "") {
+        sleep(1);
+       next;
+    }
+
     print "\n\n", "="x78, "\n$logf:\n\n";
 
     tail( $logf );
@@ -58,11 +66,15 @@ while( 1 ) {
 sub read_progress () {
     my $f = $conf->get('HOME') . '/build/build-progress';
     my $p = "";
+    my $state = "";
 
     open( F, "<$f" ) || return "";
     while( <F> ) {
-       $p = $1 if /^(\S+): building/;
+       s/_[0-9]+:/_/;
+       ($p,$state) = ($1,$2) if /^(\S+): (\S+)$/;
     }
+    return ""
+        if ($state ne "building");
     close( F );
     return $p;
 }
@@ -111,6 +123,7 @@ sub tail ($) {
            print $_;
            if (/^Build needed \d\d:\d\d:\d\d/) {
                close( F );
+               sleep( 1 );
                return;
            }
        }

Reply via email to