The following commit has been merged in the master branch:
commit bb70204c9816479ae56e3bb087f14d89bc05e466
Author: Raphaël Hertzog <[email protected]>
Date: Tue Feb 23 16:50:17 2010 +0100
dpkg-source: new options --extend-diff-ignore, --diff-ignore, --tar-ignore
--extend-diff-ignore is a truly new option while the others are long names
for the existing -i and -I options.
diff --git a/debian/changelog b/debian/changelog
index 4e0b964..bac243c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,9 @@ dpkg (1.15.6) UNRELEASED; urgency=low
"2.0" and "3.0 (quilt)" to auto-create the main original tarball when
there are supplementary tarballs. This makes it easier to bundle
multiple software together. Closes: #554488
+ * dpkg-source supports long option names --diff-ignore and --tar-ignore for
+ -i and -I. A new option --extend-diff-ignore is introduced. Those options
+ can thus now be used in debian/source/options.
[ Guillem Jover ]
* Handle argument parsing in dpkg-checkbuilddeps and dpkg-scanpackages
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 61daae7..065995c 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -133,7 +133,7 @@ files. Supported values are:
.IR 1 " to " 9 ", " best ", and " fast .
\fI9\fP is the default.
.TP
-.BR \-i [\fIregexp\fP]
+.BR \-i "[\fIregexp\fP], " \-\-diff\-ignore [=\fIregexp\fP]
You may specify a perl regular expression to match files you want
filtered out of the list of files for the diff. (This list is
generated by a find command.) (If the source package is being built as a
@@ -155,7 +155,14 @@ default it can match any part of a path, so if you want to
match the
begin of a filename or only full filenames, you will need to provide
the necessary anchors (e.g. '(^|/)', '($|/)') yourself.
.TP
-.BR \-I [\fIfile-pattern\fP]
+.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.
+.TP
+.BR \-I "[\fIfile-pattern\fP], " \-\-tar\-ignore [=\fIfile-pattern\fP]
If this option is specified, the pattern will be passed to
.BR tar (1)'s
\-\-exclude
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index b6c89bf..e8972a7 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -144,11 +144,13 @@ while (@options) {
$override{$1} = $2;
} elsif (m/^-U([^\=:]+)$/) {
$remove{$1} = 1;
- } elsif (m/^-i(.*)$/) {
+ } elsif (m/^-(?:i|-diff-ignore(?:$|=))(.*)$/) {
$options{'diff_ignore_regexp'} = $1 ? $1 :
$Dpkg::Source::Package::diff_ignore_default_regexp;
- } elsif (m/^-I(.+)$/) {
+ } elsif (m/^--extend-diff-ignore=(.+)$/) {
+ $Dpkg::Source::Package::diff_ignore_default_regexp .= "|$1";
+ } elsif (m/^-(?:I|-tar-ignore=)(.+)$/) {
push @{$options{'tar_ignore'}}, $1;
- } elsif (m/^-I$/) {
+ } elsif (m/^-(?:I|-tar-ignore)$/) {
unless ($tar_ignore_default_pattern_done) {
push @{$options{'tar_ignore'}},
@Dpkg::Source::Package::tar_ignore_default_pattern;
# Prevent adding multiple times
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]