X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwanna-build;h=8a42f08483442918f3485e356cb21383d975905a;hb=02f1b46508fd108abdd32cf2c799c813da7fd5de;hp=7d3678ac4663abf5f2c601ab9b722473ff3c34fd;hpb=a447022b77f6a40d9d1f4b8f5ad26f964753f041;p=wannabuild.git diff --git a/bin/wanna-build b/bin/wanna-build index 7d3678a..8a42f08 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -2360,12 +2360,13 @@ sub parse_all_v3 { foreach my $name (keys %$srcs) { next if $name eq '_binary'; - # state = installed, out-of-date, uncompiled, not-for-us, auto-not-for-us + # state = installed, out-of-date, uncompiled, packages-arch-specific, overwritten-by-arch-all, arch-not-in-arch-list, arch-all-only my $pkgs = $srcs->{$name}; + next if isin($pkgs->{'status'}, qw ); my $pkg = $db->{$name}; unless ($pkg) { - next SRCS if $pkgs->{'status'} eq 'not-for-us'; + next SRCS if $pkgs->{'status'} eq 'packages-arch-specific'; my $logstr = sprintf("merge-v3 %s %s_%s (%s, %s):", $vars->{'time'}, $name, $pkgs->{'version'}, $vars->{'arch'}, $vars->{'suite'}); # does at least one binary exist in the database and is more recent - if so, we're probably just outdated, ignore the source package @@ -2377,18 +2378,22 @@ 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'}//""). ($pkg->{'binary_nmu_version'} ? ";b".$pkg->{'binary_nmu_version'} : ""). - ", $pkg->{'state'}):"; + ", $pkg->{'state'}".($pkg->{'notes'} ? "/".$pkg->{'notes'} : "")."):"; 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', + 'arch-not-in-arch-list' => 'Auto-Not-For-Us', 'packages-arch-specific' => 'Auto-Not-For-Us', 'overwritten-by-arch-all' => 'Auto-Not-For-Us', 'arch-all-only' => '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) { @@ -2408,9 +2413,12 @@ sub parse_all_v3 { $change++; } } - if (isin($pkgs->{'status'}, qw (related)) and $pkg->{'notes'} ne "related") { - $pkg->{'notes'} = "related"; - $change++; + if (isin($pkgs->{'status'}, qw )) { + my $tnotes = $pkgs->{'status'}; + if (($pkg->{'notes'}//"") ne $tnotes) { + $pkg->{'notes'} = $tnotes; + $change++; + } } if ($change) { print "$logstr set to $tstate/".($pkg->{'notes'}//"")."\n" if $verbose || $simulate; @@ -2420,21 +2428,6 @@ sub parse_all_v3 { next; } - if ($pkgs->{'status'} eq 'not-for-us') { - next if isin( $pkg->{'state'}, qw(Not-For-Us Installed Failed-Removed)); - - if (isin( $pkg->{'state'}, qw(Failed Build-Attempted Built))) { - change_state( \$pkg, "Failed-Removed" ); - log_ta( $pkg, "--merge-v3: Failed-Removed" ) unless $simulate; - update_source_info($pkg) unless $simulate; - print "$logstr (virtually) deleted from database\n" if $verbose || $simulate; - next; - } - - print "$logstr should delete (not-for-us according to P-a-s)\n" if $verbose || $simulate || 1; # not implemented yet on purpose - next; - } - # only uncompiled / out-of-date are left, so check if anything new if (!(isin($pkgs->{'status'}, qw (uncompiled out-of-date)))) { print "$logstr package in unknown state: $pkgs->{'status'}\n";