Nvidia-installer-update-db fetchs the most out-dated branch (solved)

Running nvidia-installer-update-db produces

Fetching NVIDIA graphics card ids from nvidia.com ...
Error: GetNvidiaIds: fetching ids from branch '173.14.39' failed.
Error: NvidiaIdsCommon: GetNvidiaIds failed.
Error: GetNvidiaIds: fetching ids from branch '173.14.39' failed.
Error: NvidiaIdsCommon: GetNvidiaIds failed.
Error: NvidiaIdsLatest: NvidiaIdsCommon failed.
Error: cannot fetch latest NVIDIA ids

which is fetching the 173.14.39 branch instead of 450.66. The root of the problem is this line. I have tried simulate the source code in bash terminal using:

[toni@AN515 ~]$ string="Latest Long Lived Branch"
[toni@AN515 ~]$ data="$(wget -q --timeout=10 -O- https://www.nvidia.com/en-us/drivers/unix)"
[toni@AN515 ~]$ echo "$data" | grep "$string" | head -n 1 | sed 's|^.*">\([0-9\.]*\)<.*$|\1|'
173.14.39

Unfortunately I don’t really understand how sed command works.

1 Like

i can confirm that: same here @manuel ?

.* is too greedy in thad sed regular expression and the line contains too much information.
This would be a working version:

$ string="Latest Long Lived Branch"
$ data="$(wget -q --timeout=10 -O- https://www.nvidia.com/en-us/drivers/unix)"
$ echo "$data" | grep -Pom1 "${string}[^<]*<[^>]*>\K[0-9\.]*"
450.66

edit: That grep expression can be shortened a little:

$ echo "$data" | grep -Pom1 "${string}[^>]*>\K[0-9\.]*"
5 Likes

Thanks for reporting!
Nvidia has changed how they show their products. I’m currently working on it.

3 Likes

I fixed the problem, but before releasing the fix, we test it first.
Hopefully we’ll have the fix for all of you today.

4 Likes

Now it is released!
Make take some time to arrive at your mirrors though.

1 Like

Thanks! Every day something new to learn! :+1: :smile:

1 Like