Commit d26b9812 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Dpkg::Source::Patch: let analyze() extract the patch header too

parent 5b9489da
......@@ -319,6 +319,7 @@ sub analyze {
my %filepatched;
my %dirtocreate;
my @patchorder;
my $patch_header = '';
my $diff_count = 0;
sub getline {
......@@ -375,7 +376,12 @@ sub analyze {
while (defined($_) || not eof($self)) {
my (%path, %fn);
# skip comments leading up to patch (if any)
until (/^--- /) {
while (1) {
if (/^--- /) {
last;
} else {
$patch_header .= "$_\n";
}
last HUNK if not defined($_ = getline($self));
}
$diff_count++;
......@@ -492,6 +498,7 @@ sub analyze {
*$self->{'analysis'}{$destdir}{"dirtocreate"} = \%dirtocreate;
*$self->{'analysis'}{$destdir}{"filepatched"} = \%filepatched;
*$self->{'analysis'}{$destdir}{"patchorder"} = \@patchorder;
*$self->{'analysis'}{$destdir}{"patchheader"} = $patch_header;
return *$self->{'analysis'}{$destdir};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment