From 668dad827110454d0a44809aeec6ef8d8bdbc4cf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 6 Oct 2018 00:38:35 +0200 Subject: [PATCH] TT#45401 lib/get_debian_release: support Debian/buster + Debian/bullseye Currently `/etc/debian_version` for Debian/buster systems includes: buster/sid So until we get the according version number via base-files, also check for the codename instead. Make it more generic so it works for any upcoming release that uses ".*/sid", to not run into the issue again with e.g. the upcoming Debian/release codenamed bullseye (the release expected after buster). Thanks: Manuel Montecelo for improving my initial version Change-Id: I59e6adea98b6c228daa2b5ebe14872c4a35b8920 --- lib/get_debian_release | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/get_debian_release b/lib/get_debian_release index eafc077c..639ff8c2 100644 --- a/lib/get_debian_release +++ b/lib/get_debian_release @@ -19,6 +19,8 @@ $debian_codename = 'buster'; } elsif ($debian_version =~ /^11\.*/) { $debian_codename = 'bullseye'; + } elsif ($debian_version =~ /^[[:alnum:]]+\.*\/sid/) { + $debian_codename = (split /\//, $debian_version, 2)[0]; } die "Fatal error retrieving Debian release codename [$debian_codename]" unless length $debian_codename; die "Fatal error retrieving Debian release version [$debian_version]" unless length $debian_version;