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

github.com/apt-mirror/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Georgiev <chutz@gg3.net>2022-05-15 09:07:34 +0300
committerGeorgi Georgiev <310867+chutzimir@users.noreply.github.com>2022-07-09 06:10:12 +0300
commit606aace0119683a450287bf708dc920aa5dbc081 (patch)
tree59cda4797e00fe73a1b7c55116fa6b6ab9fd9ff3
parent76bd728ec6e799073183622ea13c3ca9b4f65e82 (diff)
Anything downloaded should be kept
Do the skipclean logic in only one place. The logic is pretty simple - if we downloaded a file, then we *must* keep it, so it is logical to add it to `add_url_to_download`. Also dropping the logic to keep the uncompressed index files as per the previous commit we do not need to host them.
-rwxr-xr-xapt-mirror20
1 files changed, 3 insertions, 17 deletions
diff --git a/apt-mirror b/apt-mirror
index 8f43803..7485a53 100755
--- a/apt-mirror
+++ b/apt-mirror
@@ -388,6 +388,9 @@ sub add_url_to_download
{
my $url = remove_double_slashes(shift);
$urls_to_download{$url} = shift;
+ $url =~ s[^(\w+)://][];
+ $url =~ s[~][%7E]g if get_variable("_tilde");
+ $skipclean{$url} = 1;
}
foreach (@config_sources)
@@ -436,16 +439,6 @@ chdir get_variable("skel_path") or die("apt-mirror: can't chdir to skel");
@index_urls = sort keys %urls_to_download;
download_urls( "index", @index_urls );
-foreach ( keys %urls_to_download )
-{
- s[^(\w+)://][];
- s[~][%7E]g if get_variable("_tilde");
- $skipclean{$_} = 1;
- $skipclean{$_} = 1 if s[\.gz$][];
- $skipclean{$_} = 1 if s[\.bz2$][];
- $skipclean{$_} = 1 if s[\.xz$][];
-}
-
######################################################################################
## Download all relevant metadata
@@ -585,13 +578,6 @@ print "]\n\n";
push( @index_urls, sort keys %urls_to_download );
download_urls( "metadata", sort keys %urls_to_download );
-foreach ( keys %urls_to_download )
-{
- s[^(\w+)://][];
- s[~][%7E]g if get_variable("_tilde");
- $skipclean{$_} = 1;
-}
-
######################################################################################
## by-hash SHA256 files download