Package: apt-mirror
Version: 0.4.4-4
Severity: normal

Hi,

apt-mirror cleans out all files with a ~ in the filename, only to
download them again on the next invocation.

The problem is that the filenames in %skipclean have the ~ replaced with
'%7E', and are not matching the filenames on disk. The attached patch
fixes this in the least intrusive, but not very efficient way. I guess
the proper fix would be to not store modified filenames in %skipclean in
the first place; alas, the patch works and demonstrates the problem.

Cheers, Til

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.17-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages apt-mirror depends on:
ii  adduser                    3.63          Add and remove users and groups
ii  perl                       5.8.4-8sarge5 Larry Wall's Practical Extraction 
ii  perl-modules               5.8.4-8sarge5 Core Perl modules
ii  wget                       1.9.1-12      retrieves files from the web

-- no debconf information
--- apt-mirror.orig     2007-03-14 09:18:01.000000000 +0100
+++ apt-mirror  2007-03-14 09:35:17.000000000 +0100
@@ -489,7 +489,9 @@
 
 sub process_file {
     my $file = shift;
+    $file =~ s[~][%7E] if get_variable("_tilde");
     return 1 if $skipclean{$file};
+    $file =~ s[%7E][~] if get_variable("_tilde");
     push @rm_files, $file;
     my (undef, undef, undef, undef, undef, undef, undef, $size, undef, undef, 
undef, undef, $blocks) = stat($file);
     $unnecessary_bytes += $blocks * 512;

Reply via email to