cc6b1c8810
For reasons explained in [1] Debian's lsb_release.py on bullseye is falling back to probing "apt-cache policy" When (as currently), stretch is the testing release, /etc/debian_version contains "stretch/sid", as shipped by base-files. It is therefore impossible to rely on that file to differentiate between a host running testing or unstable without asking apt what is actually preferred when installing packages (through parsing `apt-cache policy`). That's how `lsb-release -- codename` returns "sid" _xor_ "stretch". The problem is, this parses the output of "apt-cache policy" which fails for two reasons; firsly we have cleared out all the cache files, so our hosts return anything until "apt-get update" is run, but secondly because our mirrors do not have a "label" that matches in this code at [2] e.g. what we get out of "apt-cache policy" is 500 https://mirror.dfw.rax.opendev.org/debian bullseye/main amd64 Packages release o=Debian,n=bullseye,c=main,b=amd64 origin mirror.dfw.rax.opendev.org which is missing a "l=" field to make this parsing recognise it as a valid source. The label is set by reprepro [3] Label This optional field is simply copied into the Release files. Add a label to make our mirrors look more like regular mirrors. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845651 [2] https://sources.debian.org/src/lsb/11.1.0/lsb_release.py/#L191 [3] https://manpages.debian.org/stretch/reprepro/reprepro.1.en.html Change-Id: Id705acbb3a01f43ae635a24fa3c24d0a05bdaa16