Преглед изворни кода

dpkg-source: ignore changes on debian/patches/.dpkg-source-applied

With 2.0 source packages, dpkg-source records as a comment in
debian/patches/.dpkg-source-applied whether the patches have
been applied at build time or at unpack time.

This can lead to differences between the file in the build tree
and the file in the reference tree used to check for changes.
Thus we need to ignore that file in the diff process or the build
might fail considering this difference as a local change that
has not been recorded in a patch.

Reported-by: Jakub Wilk <jwilk@debian.org>
Raphaël Hertzog пре 15 година
родитељ
комит
f18c197931
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 2 0
      debian/changelog
  2. 2 1
      scripts/Dpkg/Source/Package/V2.pm

+ 2 - 0
debian/changelog

@@ -14,6 +14,8 @@ dpkg (1.16.1.1) UNRELEASED; urgency=low
   * Fix trigger setup code to not reset the status of packages
   * Fix trigger setup code to not reset the status of packages
     when they are in a status different from triggers-awaited,
     when they are in a status different from triggers-awaited,
     triggers-pending or installed. Closes: #644492
     triggers-pending or installed. Closes: #644492
+  * Fix dpkg-source to ignore changes on debian/patches/.dpkg-source-applied
+    when building a "2.0" source package. Closes: #642656
 
 
   [ Guillem Jover ]
   [ Guillem Jover ]
   * Change dpkg-buildflags to set preprocessor option -D_FORTIFY_SOURCE=2
   * Change dpkg-buildflags to set preprocessor option -D_FORTIFY_SOURCE=2

+ 2 - 1
scripts/Dpkg/Source/Package/V2.pm

@@ -287,7 +287,8 @@ sub after_build {
 sub prepare_build {
 sub prepare_build {
     my ($self, $dir) = @_;
     my ($self, $dir) = @_;
     $self->{'diff_options'} = {
     $self->{'diff_options'} = {
-        diff_ignore_regexp => $self->{'options'}{'diff_ignore_regexp'},
+        diff_ignore_regexp => $self->{'options'}{'diff_ignore_regexp'} .
+                              '|(^|/)debian/patches/.dpkg-source-applied$',
         include_removal => $self->{'options'}{'include_removal'},
         include_removal => $self->{'options'}{'include_removal'},
         include_timestamp => $self->{'options'}{'include_timestamp'},
         include_timestamp => $self->{'options'}{'include_timestamp'},
         use_dev_null => 1,
         use_dev_null => 1,