my ($anchor, $breakwater);
my $clogonly;
my $cl;
+ my $found_pm;
$fatal //= sub { fail $_[1]; };
my $x = sub {
my ($cb, $tagsfx, $mainwhy, $xwhy) = @_;
$breakwater = undef;
} elsif ($ty eq 'Pseudomerge' or
$ty eq 'AddPatches') {
+ my $found_pm = 1;
$x->($furniture, (lc $ty),
"found interchange bureaucracy commit ($ty)"," ($head)");
} elsif ($ty eq 'DgitImportUnpatched') {
- $x->($trouble, 'dgitimport',
- "found dgit dsc import ($head)");
- return (undef,undef);
+ if ($found_pm) {
+ $x->($trouble, 'dgitimport',
+ "found dgit dsc import"," ($head)");
+ return (undef,undef);
+ } else {
+ $x->($fatal, 'unprocessable',
+ "found bare dgit dsc import with no prior history",
+ " ($head)");
+ return (undef,undef);
+ }
} else {
$x->($fatal, 'unprocessable',
"found unprocessable commit, cannot cope: $cl->{Why}",
if ($nogenerate) {
return (undef,undef);
}
- fail "found unprocessable commit, cannot cope:".
- (defined $cl->{Why} ? "; $cl->{Why}": '').
+ fail "found unprocessable commit, cannot cope".
+ (defined $cl->{Why} ? "; $cl->{Why}:": ':').
" (commit $cur) (d.".
(join ' ', map { sprintf "%#x", $_->{Differs} }
@{ $cl->{Parents} }).
next;
} else {
# Everything is from this import. This kind of import
- # is already in valid breakwater format, with the
- # patches as commits.
- printf $report " NoPM" if $report;
- # last thing we processed will have been the first patch,
- # if there is one; which is fine, so no need to rewrite
- # on account of this import
- $build_start->("ImportOrigin", $cur);
+ # is already nearly in valid breakwater format, with the
+ # patches as commits. Unfortunately it contains
+ # debian/patches/.
+ printdebug "*** WALK BOMB bare dgit import\n";
+ $cl->{Why} = "bare dgit dsc import";
+ return $bomb->();
}
die "$ty ?";
} else {