forked from josch/mmdebstrap
hardcode 'stable' to use stable-security mirror
This commit is contained in:
parent
388c7980d3
commit
0da6f103a1
1 changed files with 10 additions and 10 deletions
18
mmdebstrap
18
mmdebstrap
|
@ -3951,19 +3951,25 @@ sub get_sourceslist_by_suite {
|
|||
# the security mirror changes, starting with bullseye
|
||||
# https://lists.debian.org/87r26wqr2a.fsf@43-1.org
|
||||
my $bullseye_or_later = 0;
|
||||
if (
|
||||
any { $_ eq $suite }
|
||||
('stable', 'bullseye', 'bookworm', 'trixie')
|
||||
) {
|
||||
$bullseye_or_later = 1;
|
||||
}
|
||||
my $distro_info = '/usr/share/distro-info/debian.csv';
|
||||
# make $@ local, so we don't print "Can't locate Debian/DistroInfo.pm"
|
||||
# in other parts where we evaluate $@
|
||||
local $@ = '';
|
||||
eval { require Debian::DistroInfo; };
|
||||
if (!$@) {
|
||||
# libdistro-info-perl is installed
|
||||
debug "libdistro-info-perl is installed";
|
||||
my $debinfo = DebianDistroInfo->new();
|
||||
if ($debinfo->version($suite, 0) >= 11) {
|
||||
$bullseye_or_later = 1;
|
||||
}
|
||||
} elsif (-f $distro_info) {
|
||||
# distro-info-data is installed
|
||||
debug "distro-info-data is installed";
|
||||
open my $fh, '<', $distro_info
|
||||
or error "cannot open $distro_info: $!";
|
||||
my $i = 0;
|
||||
|
@ -4010,13 +4016,7 @@ sub get_sourceslist_by_suite {
|
|||
$bullseye_or_later = 1;
|
||||
}
|
||||
} else {
|
||||
# neither libdistro-info-perl nor distro-info-data is installed
|
||||
if (
|
||||
any { $_ eq $suite }
|
||||
('stable', 'bullseye', 'bookworm', 'trixie')
|
||||
) {
|
||||
$bullseye_or_later = 1;
|
||||
}
|
||||
debug "neither libdistro-info-perl nor distro-info-data installed";
|
||||
}
|
||||
if ($bullseye_or_later) {
|
||||
# starting from bullseye use
|
||||
|
|
Loading…
Reference in a new issue