X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fwanna-build;h=d08da9386f3d967e46ca2b8d394f4fe52914d1c3;hb=c90eb45c367d03ed787e31c8751828baf9f3f631;hp=41ee82b5d17dba8afa19595516c1c49e2ac27cad;hpb=5f0e6ec66f488b7270236acea2a4b017996bd574;p=wannabuild.git diff --git a/bin/wanna-build b/bin/wanna-build index 41ee82b..d08da93 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -575,6 +575,10 @@ sub add_one_building { $ok = 0; $reason = "not all source dependencies available yet"; } + elsif ($pkg->{'State'} =~ /^BD-Uninstallable/) { + $ok = 0; + $reason = "source dependencies are not installable"; + } elsif ($pkg->{'State'} eq "Uploaded" && (version_lesseq($version, $pkg->{'Version'}))) { $ok = 0; @@ -869,6 +873,10 @@ sub add_one_failed { print "$name: Warning: marked as waiting for dependencies, ". "but processing anyway.\n"; } + elsif ($state eq "BD-Uninstallable") { + print "$name: Warning: marked as having uninstallable build-dependencies, ". + "but processing anyway.\n"; + } elsif ($state eq "Failed") { print "$name: already registered as failed; will append new message\n" if $fail_reason; @@ -971,6 +979,17 @@ sub add_one_needsbuild { return; } } + if ($state eq "BD-Uninstallable") { + if ($opt_override) { + print "$name: Forcing uninstallability mark to be removed\n"; + } + else { + print "$name: has uninstallable build-dependencies. Skipping\n", + " (use --override to clear dependency list and ", + "give back anyway)\n"; + return; + } + } elsif (!isin( $state, qw(Building Built Build-Attempted))) { print "$name: not taken for building (state is $state)."; if ($opt_override) { @@ -1122,7 +1141,7 @@ sub add_one_depwait { print "$name: merging with previously registered dependencies\n"; } - if (isin( $state, qw(Needs-Build Failed))) { + if (isin( $state, qw(Needs-Build Failed BD-Uninstallable))) { print "$name: Warning: not registered for building previously, ". "but processing anyway.\n"; } @@ -1619,7 +1638,8 @@ sub parse_quinn_diff { } # Now re-check the DB for packages in states Needs-Build, Failed, - # or Dep-Wait and remove them if they're not listed anymore by quinn-diff. + # Dep-Wait or BD-Uninstallable and remove them if they're not listed + # anymore by quinn-diff. if ( !$partial ) { my $name; foreach $name (keys %db) { @@ -1627,7 +1647,7 @@ sub parse_quinn_diff { my $pkg = $db{$name}; next if defined $pkg->{'Binary-NMU-Version'}; next if !isin( $pkg->{'State'}, - qw(Needs-Build Building Built Build-Attempted Uploaded Failed Dep-Wait) ); + qw(Needs-Build Building Built Build-Attempted Uploaded Failed Dep-Wait BD-Uninstallable) ); my $virtual_delete = $pkg->{'State'} eq 'Failed'; if (!$quinn_pkgs{$name}) { @@ -1851,6 +1871,8 @@ sub list_packages { if $pkg->{'State'} =~ /^Failed/; print " Dependencies: $pkg->{'Depends'}\n" if $pkg->{'State'} eq "Dep-Wait"; + print " Reason: $pkg->{'Reason'}\n" + if $pkg->{'State'} eq "BD-Uninstallable"; print " Previous state was $pkg->{'Previous-State'} until ", "$pkg->{'State-Change'}\n" if $verbose && $pkg->{'Previous-State'}; @@ -2167,7 +2189,7 @@ sub check_entry { die "Bad state $pkg->{'State'} of package $pkg->{Package}\n" if !isin( $pkg->{'State'}, qw(Needs-Build Building Built Build-Attempted Uploaded Installed Dep-Wait - Failed Failed-Removed Not-For-Us + Failed Failed-Removed Not-For-Us BD-Uninstallable ) ); } @@ -2239,6 +2261,9 @@ sub change_state { delete $pkg->{'Failed'}; delete $pkg->{'Failed-Category'}; } + if (defined($$state) and $$state eq 'BD-Uninstallable') { + delete $pkg->{'Reason'}; + } $$state = $newstate; } @@ -2589,7 +2614,6 @@ sub call_edos_depcheck { change_state( \$pkg, 'BD-Uninstallable' ); } else { $pkg->{'State'} = 'Needs-Build'; - delete $pkg->{'Reason'}; change_state( \$pkg, 'Needs-Build' ); } log_ta( $pkg, "--merge-all" );