From 7cdeb9bafb4512b29b40e3c74fef7ced7e03a01b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 29 Apr 2017 23:43:49 +0200 Subject: Dpkg::Source::Package: Ignore debian/files and debian/files.new by default These are generated files, and these pathnames are part of the external interface. With the introduction of the buildinfo support, these get generated even on source builds, which means that it can disrupt previous workflows based on not cleaning the source tree, because they assumed that source-only builds did not have filesystem side-effects. --- scripts/Dpkg/Source/Package.pm | 8 ++++++-- scripts/Dpkg/Source/Package/V1.pm | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'scripts/Dpkg') diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 9a9daea78..da66cd24e 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -230,14 +230,18 @@ sub init_options { # note: this function is not called by V1 packages $self->{options}{diff_ignore_regex} ||= $diff_ignore_default_regex; $self->{options}{diff_ignore_regex} .= '|(?:^|/)debian/source/local-.*$'; + $self->{options}{diff_ignore_regex} .= '|(?:^|/)debian/files(?:\.new)?$'; if (defined $self->{options}{tar_ignore}) { $self->{options}{tar_ignore} = [ @tar_ignore_default_pattern ] unless @{$self->{options}{tar_ignore}}; } else { $self->{options}{tar_ignore} = [ @tar_ignore_default_pattern ]; } - push @{$self->{options}{tar_ignore}}, 'debian/source/local-options', - 'debian/source/local-patch-header'; + push @{$self->{options}{tar_ignore}}, + 'debian/source/local-options', + 'debian/source/local-patch-header', + 'debian/files', + 'debian/files.new'; # Skip debianization while specific to some formats has an impact # on code common to all formats $self->{options}{skip_debianization} //= 0; diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index 0e02cc389..9da960432 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -51,8 +51,12 @@ sub init_options { } else { $self->{options}{diff_ignore_regex} = '(?:^|/)debian/source/local-.*$'; } - push @{$self->{options}{tar_ignore}}, 'debian/source/local-options', - 'debian/source/local-patch-header'; + $self->{options}{diff_ignore_regex} .= '|(?:^|/)debian/files(?:\.new)?$'; + push @{$self->{options}{tar_ignore}}, + 'debian/source/local-options', + 'debian/source/local-patch-header', + 'debian/files', + 'debian/files.new'; $self->{options}{sourcestyle} //= 'X'; $self->{options}{skip_debianization} //= 0; $self->{options}{ignore_bad_version} //= 0; -- cgit v1.2.3