dpkg patch
Hello.
Scott James Remnant asked me to send this patch here so that is what I
am doing. Pending further review this will be in Ubuntu's dpkg soon.
I'm not on this list.
cheers
diff -Nru /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/config.h.in /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/config.h.in
--- /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/config.h.in 2007-07-04 10:26:27.000000000 -0400
+++ /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/config.h.in 2007-11-02 11:26:14.000000000 -0400
@@ -394,6 +394,10 @@
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
diff -Nru /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/debian/changelog /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/debian/changelog
--- /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/debian/changelog 2007-09-21 14:14:07.000000000 -0400
+++ /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/debian/changelog 2007-11-02 12:47:07.000000000 -0400
@@ -1,3 +1,16 @@
+dpkg (1.14.5ubuntu17) hardy; urgency=low
+
+ * Add 'tarignore' and 'diffignore' functionality
+ - list files (eg: '.git' or '.bzr') one per line to debian/tarignore
+ for dpkg-source -b to exclude them from the tarball
+ - list regexps one per line to debian/diffignore for dpkg-source -b
+ to exclude them from the diff
+ - lines starting with '#' are comments
+ - blank lines ignored
+ - empty file means to use the default (same as '-i' on command line)
+
+ -- Ryan Lortie <desrt@desrt.ca> Fri, 02 Nov 2007 12:44:53 -0400
+
dpkg (1.14.5ubuntu16) gutsy; urgency=low
* Fix some portability problems revealed by compiler warnings:
diff -Nru /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/scripts/dpkg-source.pl /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/scripts/dpkg-source.pl
--- /tmp/77OrHozhjl/dpkg-1.14.5ubuntu16/scripts/dpkg-source.pl 2007-07-11 06:07:02.000000000 -0400
+++ /tmp/7K87wZ5HdW/dpkg-1.14.5ubuntu17/scripts/dpkg-source.pl 2007-11-02 12:44:08.000000000 -0400
@@ -439,6 +439,16 @@
&syserr(sprintf(_g("unable to check for existence of `%s'"), $tarname));
}
+ if (open(TARIGNORE, "$dirname/debian/tarignore")) {
+ while (<TARIGNORE>) {
+ chomp;
+ push @tar_ignore, "--exclude=$_"
+ }
+ close TARIGNORE;
+ } elsif ($! != ENOENT) {
+ &syserr(_g("unable to check for existence of `$dirname/debian/tarignore"));
+ }
+
printf(_g("%s: building %s in %s")."\n",
$progname, $sourcepackage, $tarname)
|| &syserr(_g("write building tar message"));
@@ -503,7 +513,28 @@
}
if ($sourcestyle =~ m/[kpursKPUR]/) {
-
+ if (not $diff_ignore_regexp) {
+ if (open(DIFFIGNORE, "$dir/debian/diffignore")) {
+ my $diffignore_contents = '';
+
+ while (<DIFFIGNORE>) {
+ chomp;
+ s/^#.*$//;
+ s/([^|])$/$1\|/;
+ $diffignore_contents .= $_;
+ }
+
+ $diffignore_contents =~ s/\|$//;
+ close DIFFIGNORE;
+
+ $diff_ignore_regexp = $diffignore_contents ?
+ $diffignore_contents :
+ $diff_ignore_default_regexp;
+ } elsif ($! != ENOENT) {
+ &syserr(_g("unable to check for existence of `$dir/debian/diffignore'"));
+ }
+ }
+
printf(_g("%s: building %s in %s")."\n",
$progname, $sourcepackage, "$basenamerev.diff.gz")
|| &syserr(_g("write building diff message"));
Reply to: