make $@ local, so we don't print "Can't locate Dpkg/Vendor/Debian.pm" in other parts where we evaluate $@

This commit is contained in:
Johannes Schauer Marin Rodrigues 2021-11-29 21:15:59 +01:00
parent 60d69f6f78
commit c4a43ea0f9
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -3794,6 +3794,9 @@ sub get_keyring_by_suite {
my $debianvendor; my $debianvendor;
my $ubuntuvendor; my $ubuntuvendor;
# make $@ local, so we don't print "Can't locate Dpkg/Vendor/Debian.pm"
# in other parts where we evaluate $@
local $@ = '';
eval { eval {
require Dpkg::Vendor::Debian; require Dpkg::Vendor::Debian;
require Dpkg::Vendor::Ubuntu; require Dpkg::Vendor::Ubuntu;
@ -3913,6 +3916,9 @@ sub get_sourceslist_by_suite {
# https://lists.debian.org/87r26wqr2a.fsf@43-1.org # https://lists.debian.org/87r26wqr2a.fsf@43-1.org
my $bullseye_or_later = 0; my $bullseye_or_later = 0;
my $distro_info = '/usr/share/distro-info/debian.csv'; 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; }; eval { require Debian::DistroInfo; };
if (!$@) { if (!$@) {
# libdistro-info-perl is installed # libdistro-info-perl is installed