diff options
author | Guillem Jover <guillem@debian.org> | 2017-04-29 23:43:49 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2017-05-17 06:29:33 +0200 |
commit | 7cdeb9bafb4512b29b40e3c74fef7ced7e03a01b (patch) | |
tree | 26181dea27f085bda60a2f7a4577c3c7f227ada9 /scripts/Dpkg | |
parent | 45f0c9a93098af4173a6cd6c6a90b3e5d043f213 (diff) | |
download | dpkg-7cdeb9bafb4512b29b40e3c74fef7ced7e03a01b.tar.gz |
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.
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Source/Package.pm | 8 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V1.pm | 8 |
2 files changed, 12 insertions, 4 deletions
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; |