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

dpkg-source: enhance --commit to auto-whitelist modified binary files

That way the same command can be used whatever kind of upstream files has
been modified.
Reported-by: Cyril Brulebois's avatarCyril Brulebois <kibi@debian.org>
parent fb623de7
......@@ -8,6 +8,9 @@ dpkg (1.16.5) UNRELEASED; urgency=low
* When dpkg-source regenerates the automatic patch (with formats "2.0"
or "3.0 (quilt)") it will keep the current patch header to avoid
losing changes made by the maintainer.
* Modify dpkg-source --commit to auto-whitelist modified binary files.
That way the same command can be used whatever kind of upstream files
has been modified.
[ Updated dpkg translations ]
* Swedish (Peter Krefting).
......
......@@ -517,6 +517,11 @@ pre-generated this file, and on this ground the given file is removed
after integration. Note also that the changes contained in the patch file
must already be applied on the tree and that the files modified by the
patch must not have supplementary unrecorded changes.
If the patch generation detects modified binary files, they will be
automatically added to \fBdebian/source/include\-binaries\fP so that
they end up in the debian tarball (exactly like \fBdpkg-source
\-\-include\-binaries \-b\fP would do).
.PP
.B Build options
.TP
......
......@@ -619,8 +619,17 @@ sub do_commit {
error(_g("patch file '%s' doesn't exist"), $tmpdiff) if not -e $tmpdiff;
}
my $binaryfiles = Dpkg::Source::Package::V2::BinaryFiles->new($dir);
my $handle_binary = sub {
my ($self, $old, $new) = @_;
my $fn = File::Spec->abs2rel($new, $dir);
$binaryfiles->new_binary_found($fn);
};
unless ($tmpdiff) {
$tmpdiff = $self->generate_patch($dir, usage => "commit");
$tmpdiff = $self->generate_patch($dir, handle_binary => $handle_binary,
usage => "commit");
$binaryfiles->update_debian_source_include_binaries();
}
push @Dpkg::Exit::handlers, sub { unlink($tmpdiff) };
unless (-s $tmpdiff) {
......
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