export => { arg => \$export_to, mode => "export" },
"lock-for" => { arg => \$lock_for_pid, mode => "lock-for" },
"unlock-for" => { arg => \$lock_for_pid, mode => "unlock-for" },
- "act-on-behalve-of" => { arg => \$lock_for_pid },
+ "act-on-behalf-of" => { arg => \$lock_for_pid },
"start-transaction" => { mode => "start-transaction" },
"commit-transaction" => { mode => "commit-transaction" },
"transactional" => { flag => \$transactional },
$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;
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;
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) {
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";
}
}
# 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) {
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}) {
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'};
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
) );
}
delete $pkg->{'Failed'};
delete $pkg->{'Failed-Category'};
}
+ if (defined($$state) and $$state eq 'BD-Uninstallable') {
+ delete $pkg->{'Reason'};
+ }
$$state = $newstate;
}
#print "I would look at these sources with edos-depcheck:\n";
#print join " ", keys %interesting_packages,"\n";
- open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $sourcesfile)
- or die "Failed to run wb-edos-builddebcheck: $!\n";
-
- local($/) = ""; # read in paragraph mode
- while( <EDOS> ) {
- my( $key, $reason ) ;
- s/\s*$//m;
- /^Package:\s*(\S+)$/mi and $key = $1;
- /^Failed-Why:(([^\n]|\n ([^\n]|\.))*)$/msi and $reason = $1;
- $reason =~ s/^\s*//mg;
+ if (open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $sourcesfile)) {
+ local($/) = ""; # read in paragraph mode
+ while( <EDOS> ) {
+ my( $key, $reason ) ;
+ s/\s*$//m;
+ /^Package:\s*(\S+)$/mi and $key = $1;
+ /^Failed-Why:(([^\n]|\n ([^\n]|\.))*)$/msi and $reason = $1;
+ $reason =~ s/^\s*//mg;
- if (exists $interesting_packages{$key}) {
- $interesting_packages{$key} = $reason;
- }
+ if (exists $interesting_packages{$key}) {
+ $interesting_packages{$key} = $reason;
+ } else {
+ print "TODO: edos reported a package we do not care about now" if $verbose;
+ }
+ }
+ close EDOS;
+ } else {
+ print "ERROR: Could not run wb-edos-builddebcheck. I am continuing, assuming\n" .
+ "all packages have installable build-dependencies."
}
- close EDOS;
for my $key (keys %interesting_packages) {
my $pkg = $db{$key};
(not defined $interesting_packages{$key} && $pkg->{'State'} eq 'BD-Uninstallable');
if ($change) {
if (defined $interesting_packages{$key}) {
- $pkg->{'State'} = 'BD-Uninstallable';
change_state( \$pkg, 'BD-Uninstallable' );
+ $pkg->{'Reason'} = $interesting_packages{$key};
} else {
- $pkg->{'State'} = 'Needs-Build';
change_state( \$pkg, 'Needs-Build' );
}
log_ta( $pkg, "--merge-all" );
--export FILE: Export database to a ASCII file FILE
--lock-for PID: Locks the database for the process with this pid
--unlock-for PID: Unlocks the database for the process with this pid
- --act-on-behalve-of PID: Ignores the log (if it is held by this pid)
+ --act-on-behalf-of PID: Ignores the log (if it is held by this pid)
--start-transaction: Creates a copy of the state of the database, for
use with --transactional. This overrides any previous uncommited
transaction. Should only be used after --lock-for