* scripts/dpkg-buildpackage.pl ($warnable_errors): Rename to ...
($warnable_error): ... this, and declare as 'our'.
+2007-09-24 Jari Aalto <jari.aalto@cante.net>
+ Frank Lichtenheld <djpig@debian.org>
+
+ * scripts/dpkg-source.pl: Allow use of -I
+ without filename pattern and load a list
+ of default patterns which is in effect as
+ similar as possible to the default regexp
+ of -i.
+
2007-09-23 Frank Lichtenheld <djpig@debian.org>
* scripts/dpkg-buildpackage.pl: Add new option
MAKEFLAGS(-j<n>) and DEB_BUILD_OPTIONS(parallel=<n>) accordingly.
parallel=<n> in DEB_BUILD_OPTIONS will be passed to MAKEFLAGS as
well. Based on an idea by Robert Millan. Closes: #440636
+ * Allow dpkg-source -I without a pattern which will load a default
+ list of pattern similar to -i without regexp. Patch by
+ Jari Aalto. Closes: #440972
[ Updated dpkg translations ]
* Basque (Piarres Beobide). Closes: #440859
+2007-09-24 Jari Aalto <jari.aalto@cante.net>
+
+ * dpkg-source.1: Document new behaviour
+ of -I option.
+
2007-09-23 Frank Lichtenheld <djpig@debian.org>
* dpkg-buildpackage.1: Document the new -j
unnecessarily included in every .diff.gz, unless you use the \fB\-i\fR
switch.
.TP
-.BI \-I filename
-If this option is specified, the filename will be passed to tar's \-\-exclude
+.BI \-I[\fIfile-pattern\fP]
+
+If this option is specified, the pattern will be passed to tar's \-\-exclude
option when it is called to generate a .orig.tar.gz or .tar.gz file. For
example, \-ICVS will make tar skip over CVS directories when generating
a .tar.gz file. The option may be repeated multiple times to list multiple
-filenames to exclude.
+patterns to exclude.
+
+\fB\-I\fR by itself adds default tar(1) \-\-exclude options that will
+filter out control files and directories of the most common revision
+control systems, backup and swap files and Libtool build output
+directories.
.PP
All the
.BI \-s X
\.shelf|_MTN|\.bzr(?:\.backup|tags)?)(?:$|/.*$)
';
+no warnings 'qw';
+my @tar_ignore_default_pattern = qw(
+*.a
+*.la
+*.o
+*.so
+*.swp
+*~
+,,*
+.[#~]*
+.arch-ids
+.arch-inventory
+.bzr
+.bzr.backup
+.bzr.tags
+.bzrignore
+.cvsignore
+.deps
+.git
+.gitignore
+.hg
+.shelf
+.svn
+CVS
+DEADJOE
+RCS
+_MTN
+_darcs
+{arch}
+);
+
# Take out comments and newlines
$diff_ignore_default_regexp =~ s/^#.*$//mg;
$diff_ignore_default_regexp =~ s/\n//sg;
-q quiet operation, do not print warnings.
-i[<regexp>] filter out files to ignore diffs of
(defaults to: '%s').
- -I<filename> filter out files when building tarballs.
+ -I[<pattern>] filter out files when building tarballs
+ (defaults to: %s).
-sa auto select orig source (-sA is default).
-sk use packed orig source (unpack & keep).
-sp use packed orig source (unpack & remove).
General options:
-h, --help show this help message.
--version show the version.
-"), $progname, $diff_ignore_default_regexp;
+"), $progname,
+ $diff_ignore_default_regexp,
+ join('', map { " -I$_" } @tar_ignore_default_pattern);
}
sub handleformat {
my $opmode;
+my $tar_ignore_default_pattern_done;
while (@ARGV && $ARGV[0] =~ m/^-/) {
$_=shift(@ARGV);
$diff_ignore_regexp = $1 ? $1 : $diff_ignore_default_regexp;
} elsif (m/^-I(.+)$/) {
push @tar_ignore, "--exclude=$1";
+ } elsif (m/^-I$/) {
+ unless ($tar_ignore_default_pattern_done) {
+ push @tar_ignore,
+ map { "--exclude=$_" } @tar_ignore_default_pattern;
+ # Prevent adding multiple times
+ $tar_ignore_default_pattern_done = 1;
+ }
} elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
$substvar{$1}= "$'";
} elsif (m/^-T/) {