The following commit has been merged in the master branch: commit 7665f7d8aedc99c740c530162a914f9e0ae5d3fa Author: Raphaël Hertzog <hert...@debian.org> Date: Fri May 6 09:11:33 2011 +0200
dpkg-source: fix behaviour of --extend-diff-ignore if used after --diff-ignore Up to now --extend-diff-ignore was only extending the default diff-ignore. This is usually enough as this option is usually put in debian/source/options and interpreted early enough before any other -i option (that activates the usage of the default diff-ignore regexp). Should --extend-diff-ignore appear after -i, it should still extend the regexp that we're going to use. diff --git a/debian/changelog b/debian/changelog index 1c5abbe..2b5e7b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low LP: #344019 * Tighten the regexp used by dpkg-source to ignore the .pc directory of quilt. Thanks to Mike Hommey for noticing the problem. + * Change behaviour of dpkg-source's --extend-diff-ignore to also + extend the current diff-ignore if it has already been set. [ Guillem Jover ] * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520 diff --git a/man/dpkg-source.1 b/man/dpkg-source.1 index a46b690..8dbbb7e 100644 --- a/man/dpkg-source.1 +++ b/man/dpkg-source.1 @@ -172,11 +172,11 @@ begin of a filename or only full filenames, you will need to provide the necessary anchors (e.g. '(^|/)', '($|/)') yourself. .TP .BR \-\-extend\-diff\-ignore =\fIregexp\fP -The perl regular expression specified will extend the default regular -expression associated to \fB\-i\fP by concatenating "\fB|\fP\fIregexp\fP" -to the default regexp. This option is convenient to use in -\fBdebian/source/options\fP to exclude some auto-generated files -from the automatic patch generation. +The perl regular expression specified will extend the default value +of \fB\-\-diff\-ignore\fP and its current value (if set). It does this +by concatenating "\fB|\fP\fIregexp\fP" to the existing value. +This option is convenient to use in \fBdebian/source/options\fP to exclude +some auto-generated files from the automatic patch generation. .TP .BR \-I "[\fIfile-pattern\fP], " \-\-tar\-ignore [=\fIfile-pattern\fP] If this option is specified, the pattern will be passed to diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 76c701d..5b5d5c6 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -158,6 +158,9 @@ while (@options) { $options{'diff_ignore_regexp'} = $1 ? $1 : $Dpkg::Source::Package::diff_ignore_default_regexp; } elsif (m/^--extend-diff-ignore=(.+)$/) { $Dpkg::Source::Package::diff_ignore_default_regexp .= "|$1"; + if ($options{'diff_ignore_regexp'}) { + $options{'diff_ignore_regexp'} .= "|$1"; + } } elsif (m/^-(?:I|-tar-ignore=)(.+)$/) { push @{$options{'tar_ignore'}}, $1; } elsif (m/^-(?:I|-tar-ignore)$/) { -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org