Package: apt-mirror
Version: 0.4.5-1
Followup-For: Bug #484876
The function process_directory() is called recursively, but uses a global
filehandle in opendir(). This causes the warning message reported.
Using a localized variable instead removes the problem:
--- /usr/bin/apt-mirror 2007-12-02 11:22:02.000000000 +0100
+++ apt-mirror-patched 2008-06-15 11:28:47.000000000 +0200
@@ -518,14 +518,14 @@
my $dir = shift;
my $is_needed = 0;
return 1 if $skipclean{$dir};
- opendir(DIR, $dir) or die "apt-mirror: can't opendir $dir: $!";
- foreach (grep { !/^\.$/ && !/^\.\.$/ } readdir(DIR)) {
+ opendir(my $dir_h, $dir) or die "apt-mirror: can't opendir $dir: $!";
+ foreach (grep { !/^\.$/ && !/^\.\.$/ } readdir($dir_h)) {
my $item = $dir . "/". $_;
$is_needed |= process_directory($item) if -d $item && ! -l $item;
$is_needed |= process_file($item) if -f $item;
$is_needed |= process_symlink($item) if -l $item;
}
- closedir DIR;
+ closedir $dir_h;
push @rm_dirs, $dir unless $is_needed;
return $is_needed;
}
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (499,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages apt-mirror depends on:
ii adduser 3.108 add and remove users and groups
ii perl 5.10.0-10 Larry Wall's Practical Extraction
ii perl-modules 5.10.0-10 Core Perl modules
ii wget 1.11.3-1 retrieves files from the web
apt-mirror recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]