Upgrade to 3 impossible due to missing Codename

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
bogr
Posts: 179
Joined: 16 Nov 2015 22:46

Upgrade to 3 impossible due to missing Codename

Post by bogr » 06 Jan 2020 19:58

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

User avatar
PoltoS
Posts: 5387
Joined: 26 Jan 2011 19:36

Re: Upgrade to 3 impossible due to missing Codename

Post by PoltoS » 06 Jan 2020 23:18

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

bogr
Posts: 179
Joined: 16 Nov 2015 22:46

Re: Upgrade to 3 impossible due to missing Codename

Post by bogr » 07 Jan 2020 19:10

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!

User avatar
PoltoS
Posts: 5387
Joined: 26 Jan 2011 19:36

Re: Upgrade to 3 impossible due to missing Codename

Post by PoltoS » 08 Jan 2020 05:06

Thanks for the confirmation, added it to the install script online

bogr
Posts: 179
Joined: 16 Nov 2015 22:46

Re: Upgrade to 3 impossible due to missing Codename

Post by bogr » 10 Jan 2020 18:14

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.

Post Reply