diff options
author | Georgi Georgiev <310867+chutzimir@users.noreply.github.com> | 2022-07-07 05:38:25 +0300 |
---|---|---|
committer | Georgi Georgiev <310867+chutzimir@users.noreply.github.com> | 2022-07-08 05:33:17 +0300 |
commit | 4f0cb32b75aeee8167cfcc73695fafe87e1f7d16 (patch) | |
tree | be84d80a7e069ade6a6e8f94808ea9865f23e6e9 | |
parent | 0d4c272e4ff06ba0e941b730d58a86f332381f80 (diff) |
The correct way to specify a flat repo is with a `/` for component
Taking the example from the specs at
https://wiki.debian.org/DebianRepository/Format#Flat_Repository_Format
The correct way to specify a flat repository is by giving a `/` or `.`
for the directory. E.g., taking the example from Stifler6996#2, instead
of trying with
```
deb-amd64 http://ftp.gwdg.de/pub/opensuse/repositories/home:/stbuehler:/lighttpd-1.4.x/xUbuntu_20.04
```
we should be using
```
deb-amd64 http://ftp.gwdg.de/pub/opensuse/repositories/home:/stbuehler:/lighttpd-1.4.x/xUbuntu_20.04 /
```
-rwxr-xr-x | apt-mirror | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -315,7 +315,7 @@ sub download_urls sub parse_config_line { - my $pattern_deb_line = qr/^[\t ]*(?<type>deb-src|deb)(?:-(?<arch>[\w\-]+))?[\t ]+(?:\[(?<options>[^\]]+)\][\t ]+)?(?<uri>[^\s]+)[\t ]+(?<components>.*)$/; + my $pattern_deb_line = qr/^[\t ]*(?<type>deb-src|deb)(?:-(?<arch>[\w\-]+))?[\t ]+(?:\[(?<options>[^\]]+)\][\t ]+)?(?<uri>[^\s]+)[\t ]+(?<components>.+)$/; my $line = $_; my %config; if ( $line =~ $pattern_deb_line ) { @@ -814,13 +814,9 @@ foreach (@config_binaries) process_index( $uri, "/dists/$distribution/$component/binary-all/Packages", 1 ); } } - elsif ($distribution) - { - process_index( $uri, "/$distribution/Packages" ); - } else { - process_index( $uri, "/Packages" ); + process_index( $uri, "/$distribution/Packages" ); } } |