diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-20 15:08:37 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-20 15:08:37 -0400 |
commit | 059f0dc2f0961521904e82808ca5e2bab881eff0 (patch) | |
tree | 249321a6beb54d95e9e9f73ecc03e921994617c4 /Debian | |
parent | ecd107bbec3336d9fa2c4cedfc2f7ce86af66bb8 (diff) |
reformat list
I think this is a bit easier to understand; I was never a fan of complex
and hard to read column headers in console output (ie, dpkg -l).
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Dh_Buildsystems.pm | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm index 5a3e45f4..0a48693f 100644 --- a/Debian/Debhelper/Dh_Buildsystems.pm +++ b/Debian/Debhelper/Dh_Buildsystems.pm @@ -95,31 +95,29 @@ sub buildsystems_list { my $action=shift; # List buildsystems (including auto and specified status) - my $auto_found; - my $specified_found; - print "STATUS (* auto, + specified) NAME - DESCRIPTION", "\n"; + my ($auto, $specified); for my $system (@BUILDSYSTEMS) { my $inst = create_buildsystem_instance($system, build_action => undef); my $is_specified = defined $opt_buildsys && $opt_buildsys eq $inst->NAME(); - my $status; - if ($is_specified) { - $status = "+"; - $specified_found = 1; + if (! defined $specified && defined $opt_buildsys && $opt_buildsys eq $inst->NAME()) { + $specified = $inst->NAME(); } - elsif (!$auto_found && $inst->check_auto_buildable($action)) { - $status = "*"; - $auto_found = 1; + elsif (! defined $auto && $inst->check_auto_buildable($action)) { + $auto = $inst->NAME(); } - else { - $status = " "; - } - printf("%s %s - %s.\n", $status, $inst->NAME(), $inst->DESCRIPTION()); + printf("%s - %s\n", $inst->NAME(), $inst->DESCRIPTION()); } - # List a 3rd party buildsystem too. - if (!$specified_found && defined $opt_buildsys) { + # List a specified 3rd party buildsystem too. + if (! defined $specified && defined $opt_buildsys) { my $inst = create_buildsystem_instance($opt_buildsys, build_action => undef); - printf("+ %s - %s.\n", $inst->NAME(), $inst->DESCRIPTION()); + printf("%s - %s.\n", $inst->NAME(), $inst->DESCRIPTION()); + $specified = $inst->NAME(); } + print "\n"; + print "Auto-selected: $auto\n" if defined $auto; + print "Specified: $specified\n" if defined $specified; + print "No system auto-selected or specified\n" + if ! defined $auto && ! defined $specified; } sub buildsystems_do { |