Page 1 of 1

Upgrade to 3 impossible due to missing Codename

Posted: 06 Jan 2020 19:58
by bogr
I've been trying to upgrade to Z-Way 3 but there's a problem with a check in the RaspbianInstall script. I've made all upgrades according to

https://z-wave.me/z-way-v3-0-0/

but the script then does a check for

Code: Select all

distro=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`
which for some reason is not set after I did the upgrade from Jessie to Buster. The os clearly shows the versions:

Code: Select all

$ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
but lsb_release -a shows that the Codename is missing:

Code: Select all

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10.2 (n/a)
Release:        10.2
Codename:       n/a
The 10-version is missing in /usr/share/pyshared/lsb_release.py, which might be the problem? But I don't think the best solution is to edit the file...

Cheers,
Bo

Re: Upgrade to 3 impossible due to missing Codename

Posted: 06 Jan 2020 23:18
by PoltoS
hm... interesting.

Please try to edit the RaspbianInstall script to add after
distro=`lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`
if [ "$distro" == "n/a" ]
then
distro=`cat /etc/os-release | grep VERSION_CODENAME | awk -F"=" '{print $2}'`
fi

If works, we will edit the script

Re: Upgrade to 3 impossible due to missing Codename

Posted: 07 Jan 2020 19:10
by bogr
Yes, great fallback, and it works. I just had a problem with the call to hkp://keyserver.ubuntu.com:80, which timed out for some reason. Did some investigation, but couldn't find anything so I just ran the script again, and then it worked. 8-)

Thanks!

Re: Upgrade to 3 impossible due to missing Codename

Posted: 08 Jan 2020 05:06
by PoltoS
Thanks for the confirmation, added it to the install script online

Re: Upgrade to 3 impossible due to missing Codename

Posted: 10 Jan 2020 18:14
by bogr
As a side note. I managed to solve the lsb_release mess. The "ordinary" os upgrade did not upgrade the lsb-release package so I eventually just did that manually:

Code: Select all

apt-get install --only-upgrade lsb-release
and now lsb_release shows buster as Codename.