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

Dpkg::Source::Package::V1.pm: correctly detect debian files

The code was erroneously assuming that $newdirectory was always
a simple filename, but it can be a complete path.
Raphaël Hertzog пре 15 година
родитељ
комит
930bb774c5
2 измењених фајлова са 4 додато и 1 уклоњено
  1. 3 0
      debian/changelog
  2. 1 1
      scripts/Dpkg/Source/Package/V1.pm

+ 3 - 0
debian/changelog

@@ -25,6 +25,9 @@ dpkg (1.16.0) UNRELEASED; urgency=low
   * Enhance dpkg-shlibdeps to not fail immediatly when a library is not found.
   * Enhance dpkg-shlibdeps to not fail immediatly when a library is not found.
     Instead continue and fail after all problems have been reported. Thanks
     Instead continue and fail after all problems have been reported. Thanks
     to Chris Baines <cbaines8@gmail.com> for the patch. Closes: #596841
     to Chris Baines <cbaines8@gmail.com> for the patch. Closes: #596841
+  * Fix dpkg-source to not list Debian packaging files as modified
+    upstream files in Format "1.0" when unpacking to a non-standard
+    directory.
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Portuguese (Miguel Figueiredo).
   * Portuguese (Miguel Figueiredo).

+ 1 - 1
scripts/Dpkg/Source/Package/V1.pm

@@ -153,7 +153,7 @@ sub do_extract {
 	my $patch_obj = Dpkg::Source::Patch->new(filename => $patch);
 	my $patch_obj = Dpkg::Source::Patch->new(filename => $patch);
 	my $analysis = $patch_obj->apply($newdirectory, force_timestamp => 1,
 	my $analysis = $patch_obj->apply($newdirectory, force_timestamp => 1,
                                          timestamp => time());
                                          timestamp => time());
-	my @files = grep { ! m{^[^/]+/debian/} }
+	my @files = grep { ! m{^\Q$newdirectory\E/debian/} }
 		    sort keys %{$analysis->{'filepatched'}};
 		    sort keys %{$analysis->{'filepatched'}};
 	info(_g("upstream files that have been modified: %s"),
 	info(_g("upstream files that have been modified: %s"),
 	     "\n " . join("\n ", @files)) if scalar @files;
 	     "\n " . join("\n ", @files)) if scalar @files;