Bug#75947: updated patch
This updated patch adds the capability of multiple -I's.
diff -ur orig/dpkg-1.9.20/scripts/dpkg-buildpackage.sh dpkg-1.9.20/scripts/dpkg-buildpackage.sh
--- orig/dpkg-1.9.20/scripts/dpkg-buildpackage.sh Thu Jun 21 21:00:36 2001
+++ dpkg-1.9.20/scripts/dpkg-buildpackage.sh Sun May 19 13:00:40 2002
@@ -41,8 +41,8 @@
-h print this message
-W Turn certain errors into warnings. } passed to
-E When -W is turned on, -E turned it off. } dpkg-source
- -i[<regex>] ignore diffs of files matching regex } only passed
- to dpkg-source
+ -i[<regex>] ignore diffs of files matching regex } only passed
+ -I<filename> filter out files when building tarballs } to dpkg-source
END
}
@@ -91,6 +91,7 @@
-sa) sourcestyle=-sa ;;
-sd) sourcestyle=-sd ;;
-i*) diffignore=$1;;
+ -I*) tarignore="$tarignore $1";;
-tc) cleansource=true ;;
-t*) targetgnusystem="$value" ;; # Order DOES matter!
-nc) noclean=true; if [ -z "$binaryonly" ]; then binaryonly=-b; fi ;;
@@ -192,7 +193,7 @@
withecho $rootcommand debian/rules clean
fi
if [ x$binaryonly = x ]; then
- cd ..; withecho dpkg-source $passopts $diffignore -b "$dirn"; cd "$dirn"
+ cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b "$dirn"; cd "$dirn"
fi
if [ x$sourceonly = x ]; then
withecho debian/rules build
diff -ur orig/dpkg-1.9.20/scripts/dpkg-source.1 dpkg-1.9.20/scripts/dpkg-source.1
--- orig/dpkg-1.9.20/scripts/dpkg-source.1 Thu Jun 21 21:00:36 2001
+++ dpkg-1.9.20/scripts/dpkg-source.1 Sun May 19 13:01:50 2002
@@ -310,6 +310,13 @@
unnecessarily included in every .diff.gz, unless you use the \fB-i\fR
switch.
.TP
+.B -I<filename>
+If this option is specified, the filename 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.
+.TP
.BR -sa , -sp , -su , -sk , -sA , -sP , -sU , -sK , -ss " with " -b
If
.BR -sk " or " -sp
@@ -614,6 +621,10 @@
.B -i[<regexp>]
Passed unchanged to
.BR dpkg-source .
+.TP
+.B -I<filename>
+Passed unchanged to
+.BR dpkg-source . May be repeated multiple times.
.TP
.B -D
Check build dependencies and conflicts; abort if unsatisfied.
diff -ur orig/dpkg-1.9.20/scripts/dpkg-source.pl dpkg-1.9.20/scripts/dpkg-source.pl
--- orig/dpkg-1.9.20/scripts/dpkg-source.pl Thu Jul 5 16:48:52 2001
+++ dpkg-1.9.20/scripts/dpkg-source.pl Sun May 19 13:02:28 2002
@@ -45,6 +45,7 @@
-sa auto select orig source (-sA is default)
-i[<regexp>] filter out files to ignore diffs of.
Defaults to: '$diff_ignore_default_regexp'
+ -I<filename> filter out files when building tarballs.
-sk use packed orig source (unpack & keep)
-sp use packed orig source (unpack & remove)
-su use unpacked orig source (pack & keep)
@@ -96,6 +97,8 @@
$remove{$1}= 1;
} elsif (m/^-i(.*)$/) {
$diff_ignore_regexp = $1 ? $1 : $diff_ignore_default_regexp;
+ } elsif (m/^-I(.+)$/) {
+ push @tar_ignore, "--exclude=$1";
} elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
$substvar{$1}= $';
} elsif (m/^-T/) {
@@ -303,7 +306,7 @@
chdir($tardirbase) || &syserr("chdir to above (orig) source $tardirbase");
open(STDOUT,">&GZIP") || &syserr("reopen gzip for tar");
# FIXME: put `--' argument back when tar is fixed
- exec('tar','-cf','-',$tardirname); &syserr("exec tar");
+ exec('tar',@tar_ignore,'-cf','-',$tardirname); &syserr("exec tar");
}
close(GZIP);
&reapgzip;
--
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: