diff options
author | Georgi Georgiev <chutz@gg3.net> | 2022-05-17 08:06:13 +0300 |
---|---|---|
committer | Georgi Georgiev <310867+chutzimir@users.noreply.github.com> | 2022-07-09 06:10:12 +0300 |
commit | 7366c2ecdaf693bc4782bd419889948c1e04cebb (patch) | |
tree | 3281bc61bea66b9f5ff6b4e9add3d96b0f68d12d /apt-mirror | |
parent | 4fa4ba34922e9960622d2343be635a77e8f4a82e (diff) |
The "all" pseudo-architecture is required
Even though we only mirror specific arch, we need to include the "all"
architecture as well.
Documented at https://wiki.debian.org/DebianRepository/Format#Architectures
Example of a repository that needs this change:
deb [arch=amd64] https://apt.puppetlabs.com/ focal puppet
Diffstat (limited to 'apt-mirror')
-rwxr-xr-x | apt-mirror | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -467,7 +467,7 @@ sub find_metadata_in_release my ( $release_uri, $release_path, $line ) = ''; my $component_regex = undef; - my $arch_regex = "(?:${arch})"; + my $arch_regex = "(?:${arch}|all)"; my $compressed_extension_regex = '(?:\.(?:gz|bz2|xz))?$'; my $dist_uri; @@ -739,6 +739,7 @@ sub process_index { my $uri = shift; my $index = shift; + my $optional = shift; my ( $path, $package, $mirror, $files ) = ''; $path = sanitise_uri($uri); @@ -760,6 +761,10 @@ sub process_index unless ( open STREAM, "<$path/$index" ) { + if ($optional) + { + return; + } warn("apt-mirror: can't open index $path/$index in process_index"); return; } @@ -839,6 +844,7 @@ foreach (@config_binaries) foreach $component (@components) { process_index( $uri, "/dists/$distribution/$component/binary-$arch/Packages" ); + process_index( $uri, "/dists/$distribution/$component/binary-all/Packages", 1 ); } } else |