]> git.donarmstrong.com Git - wannabuild.git/blobdiff - bin/wanna-build
calculate_prio: fix components: parse sections
[wannabuild.git] / bin / wanna-build
index d5813c063db69f72928a9c6bc5194f083403d4f8..7a7894d569e3162fb6f8d6af508fa089671c9849 100755 (executable)
@@ -1839,6 +1839,9 @@ sub sort_list_func {
 sub calculate_prio {
        my $priomap = $yamlmap->{priority};
        my $pkg = shift;
+        my @s=split("/", $pkg->{'section'});
+        $pkg->{'component'} = $s[0] if $s[1];
+        $pkg->{'component'} ||= 'main';
        $pkg->{'calprio'} = 0;
        foreach my $k (keys %{$priomap->{keys}}) {
                $pkg->{'calprio'} += $priomap->{keys}->{$k}{$pkg->{$k}} if $pkg->{$k} and $priomap->{keys}->{$k}{$pkg->{$k}};
@@ -1907,9 +1910,11 @@ c section (e.g. libs or utils)
 P previous state
 E in case of Dep-Wait the packages being waited on, in case of Needs-Build the number in the queue
 D in case of BD-Uninstallable the reason for the uninstallability
+d distribution
+t time of state change
 
-%{Text}?  print text in case ? is not empty, don't print ?
-%{!Text}? print text in case ? is empty, don't print ?
+%{Text}?  print Text in case ? is not empty; ? is never printed
+%{!Text}? print Text in case ? is empty; ? is never printed
 Text could contain further %. To start with !, use %!
 
 =cut
@@ -1938,6 +1943,8 @@ Text could contain further %. To start with !, use %!
             return $pkg->{'package'}."#".$arch."-bd-problem\n".
             join("\\0a",split("\n",$pkg->{'bd_problem'}))."\\0a\n"; }, $pkg, $var),
         'B' => make_fmt( sub { return $pkg->{'binary_nmu_version'} if defined $pkg->{'binary_nmu_version'}; }, $pkg, $var),
+        'd' => make_fmt( $distribution, $pkg, $var),
+        't' => make_fmt( $pkg->{'state_change'}, $pkg, $var),
     ));
 }