X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwanna-build;h=0908b927db4db90d2f4e4503d0271cf71fb7965b;hb=c6e2588fcbfabeb1a2c301f152430174647a212d;hp=ba9af8499d90b2cc00e53de16d07e79c66ef629b;hpb=855139a22236ef3381d91e13dc6986f116f6d97e;p=wannabuild.git diff --git a/bin/wanna-build b/bin/wanna-build index ba9af84..0908b92 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -190,8 +190,6 @@ GetOptions( 'distribution-aliases' => \&_set_mode, ) or usage(); $list_min_age = -1 * $list_max_age if $list_max_age; -print "export: $export_to\n"; -print "mode: $op_mode\n"; my $dbh; @@ -1461,6 +1459,7 @@ sub list_packages { undef $printformat if ($ownprintformat && $ownprintformat eq 'none'); foreach $pkg (sort sort_list_func @list) { + no warnings; if ($printformat) { print print_format($printformat, $pkg, {'cnt' => $cnt, 'scnt' => \%scnt})."\n"; ++$cnt; @@ -2378,6 +2377,8 @@ sub parse_all_v3 { } $pkg->{'package'} = $name; } + $pkg->{'version'} ||= ""; + $pkg->{'state'} ||= ""; my $logstr = sprintf("merge-v3 %s %s_%s", $vars->{'time'}, $name, $pkgs->{'version'}). ($pkgs->{'binnmu'} ? ";b".$pkgs->{'binnmu'} : ""). sprintf(" (%s, %s, previous: %s", $vars->{'arch'}, $vars->{'suite'}, $pkg->{'version'}//""). @@ -2387,9 +2388,9 @@ sub parse_all_v3 { if (isin($pkgs->{'status'}, qw (installed related)) && $pkgs->{'version'} eq $pkg->{'version'} && ($pkgs->{'binnmu'}//0) < int($pkg->{'binary_nmu_version'}//0)) { $pkgs->{'status'} = 'out-of-date'; } - if (isin($pkgs->{'status'}, qw (installed related auto-not-for-us))) { + if (isin($pkgs->{'status'}, qw )) { my $change = 0; - my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 'auto-not-for-us' => 'Auto-Not-For-Us'}->{$pkgs->{'status'}}; + my $tstate = {'installed' => 'Installed', 'related' => 'Installed', 'auto-not-for-us' => 'Auto-Not-For-Us', 'not-for-us' => 'Auto-Not-For-Us'}->{$pkgs->{'status'}}; next if isin( $pkg->{'state'}, qw) && isin( $tstate, qw); # if the package is currently current, the status is Installed, not not-for-us if ($pkg->{'state'} ne $tstate) { @@ -2409,8 +2410,15 @@ sub parse_all_v3 { $change++; } } - if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") { - $pkg->{'notes'} = "related"; + if (isin($pkgs->{'status'}, qw )) { + my $tnotes = {'related' => 'related', 'not-for-us' => 'packages-arch-specific'}->{$pkgs->{'status'}}; + if ($pkg->{'notes'} && $pkg->{'notes'} ne $tnotes) { + $pkg->{'notes'} = $tnotes; + $change++; + } + } + if ($pkgs->{'notes'} && (($pkg->{'notes'}//"") ne $pkgs->{'notes'})) { + $pkg->{'notes'} = $pkgs->{'notes'}; $change++; } if ($change) {