]> git.donarmstrong.com Git - wannabuild.git/commitdiff
Make info print field names again like the old version
authorKurt Roeckx <kurt@roeckx.be>
Sun, 6 Sep 2009 16:51:44 +0000 (16:51 +0000)
committerKurt Roeckx <kurt@roeckx.be>
Sun, 6 Sep 2009 17:37:01 +0000 (17:37 +0000)
Things like buildd-mail expect to find Package instead of package
in the output of info command.

bin/wanna-build

index 772964c15c7682b12669875580c55bcc6f19e950..0d24fd1485ddbc0630727b2e95cfabf0be1cdf7a 100755 (executable)
@@ -1843,7 +1843,17 @@ sub info_packages {
                                chomp( $val );
                                $val = "\n$val" if isin( $key, qw(Failed Old-Failed));
                                $val =~ s/\n/\n    /g;
-                               printf "  %-20s: %s\n", $key, $val;
+                               my $print_key = $key;
+                               $print_key = 'Package' if ($key eq 'package');
+                               $print_key = 'Version' if ($key eq 'version');
+                               $print_key = 'Builder' if ($key eq 'builder');
+                               $print_key = 'State' if ($key eq 'state');
+                               $print_key = 'Section' if ($key eq 'section');
+                               $print_key = 'Priority' if ($key eq 'priority');
+                               $print_key = 'Installed-Version' if ($key eq 'installed_version');
+                               $print_key = 'Previous-State' if ($key eq 'previous_state');
+                               $print_key = 'State-Change' if ($key eq 'state_change');
+                               printf "  %-20s: %s\n", $print_key, $val;
                        }
                        foreach $key (sort keys %$pkg) {
                                next if isin( $key, @firstkeys );
@@ -1851,7 +1861,20 @@ sub info_packages {
                                chomp( $val );
                                $val = "\n$val" if isin( $key, qw(Failed Old-Failed));
                                $val =~ s/\n/\n    /g;
-                               printf "  %-20s: %s\n", $key, $val;
+                               my $print_key = $key;
+                               $print_key = 'BD-Problem' if ($key eq 'bd_problem');
+                               $print_key = 'Binary-NMU-Changelog' if ($key eq 'binary_nmu_changelog');
+                               $print_key = 'Binary-NMU-Version' if ($key eq 'binary_nmu_version');
+                               $print_key = 'BuildPri' if ($key eq 'buildpri');
+                               $print_key = 'Depends' if ($key eq 'depends');
+                               $print_key = 'Failed' if ($key eq 'failed');
+                               $print_key = 'Failed-Category' if ($key eq 'failed_category');
+                               $print_key = 'Notes' if ($key eq 'notes');
+                               $print_key = 'Distribution' if ($key eq 'distribution');
+                               $print_key = 'Old-Failed' if ($key eq 'old_failed');
+                               $print_key = 'PermBuildPri' if ($key eq 'permbuildpri');
+                               $print_key = 'Rel' if ($key eq 'rel');
+                               printf "  %-20s: %s\n", $print_key, $val;
                        }
                }
        }