Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Stifler6996/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Georgiev <310867+chutzimir@users.noreply.github.com>2022-07-13 18:15:35 +0300
committerGeorgi Georgiev <310867+chutzimir@users.noreply.github.com>2022-07-13 18:20:20 +0300
commitb6d3c300c1000142bc250b5d120a306a08dbfbb7 (patch)
tree214745583410cf086f349c09ab73bb7c27bf4a8b
parent344b5cea72bb90e6f0b422e8b22c0d96a24311a2 (diff)
If a file needs to be updated, we can throw away the local copy
This prevents wget from making an extra request to the server to check if the file needs to be downloaded - we already know that we want to download it because the size is different.
-rwxr-xr-xapt-mirror4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-mirror b/apt-mirror
index 9d2bcbf..19e034c 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -793,6 +793,10 @@ sub need_update
return 1 unless ($size);
return 0 if $size_on_server == $size;
+
+ if ( get_variable("unlink") == 1 )
+ unlink $filename;
+ }
return 1;
}