ソースを参照

scripts: Do not abort when traversing symlinks to directories

dpkg-scanpackages and dpkg-scansources started using File::Find since
commit 3f8099b21bbb934d03c340fef1925824465e0571, but did not get
passed «follow_skip => 2».

Closes: #809219
Guillem Jover 10 年 前
コミット
6ca0dfd078
共有3 個のファイルを変更した4 個の追加2 個の削除を含む
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-scanpackages.pl
  3. 1 1
      scripts/dpkg-scansources.pl

+ 2 - 0
debian/changelog

@@ -2,6 +2,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
 
 
   * Print correct integer parse error for short-only command-line options.
   * Print correct integer parse error for short-only command-line options.
     This affects «dpkg-deb -z». Closes: #809174
     This affects «dpkg-deb -z». Closes: #809174
+  * Do not abort when traversing symlinks to directories in dpkg-scanpackages
+    and dpkg-scansources. Closes: #809219
   * Documentation:
   * Documentation:
     - Say value instead of option in deb-control(5).
     - Say value instead of option in deb-control(5).
     - Mark debian changelog format in bold in dpkg-parsechangelog(1).
     - Mark debian changelog format in bold in dpkg-parsechangelog(1).

+ 1 - 1
scripts/dpkg-scanpackages.pl

@@ -253,7 +253,7 @@ my $scan_archives = sub {
     push @archives, $File::Find::name if m/$find_filter/;
     push @archives, $File::Find::name if m/$find_filter/;
 };
 };
 
 
-find({ follow => 1, wanted => $scan_archives}, $binarydir);
+find({ follow => 1, follow_skip => 2, wanted => $scan_archives}, $binarydir);
 foreach my $fn (@archives) {
 foreach my $fn (@archives) {
     process_deb($pathprefix, $fn);
     process_deb($pathprefix, $fn);
 }
 }

+ 1 - 1
scripts/dpkg-scansources.pl

@@ -309,7 +309,7 @@ my $scan_dsc = sub {
     push @dsc, $File::Find::name if m/\.dsc$/;
     push @dsc, $File::Find::name if m/\.dsc$/;
 };
 };
 
 
-find({ follow => 1, wanted => $scan_dsc }, $dir);
+find({ follow => 1, follow_skip => 2, wanted => $scan_dsc }, $dir);
 foreach my $fn (@dsc) {
 foreach my $fn (@dsc) {
     # FIXME: Fix it instead to not die on syntax and general errors?
     # FIXME: Fix it instead to not die on syntax and general errors?
     eval {
     eval {