Explorar el Código

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.
Raphaël Hertzog hace 16 años
padre
commit
bb70204c98
Se han modificado 3 ficheros con 17 adiciones y 5 borrados
  1. 3 0
      debian/changelog
  2. 9 2
      man/dpkg-source.1
  3. 5 3
      scripts/dpkg-source.pl

+ 3 - 0
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

+ 9 - 2
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

+ 5 - 3
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