Feedback around appstore-list error handling

I have been mesing about with the recovery stuff, and noted a few things. I was able to get around these issues, so I don’t need help addressing them. This is just feedback around error handling with the appstore-host.

When running appstore-list on one host, it failed due to the time of the host being incorrect.

$ appstore-list
Lists not downloaded, will attempt to download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) SSL_connect failed with error -150: ASN date error, current date before
registry        |appliance id                    |description                     
----------------|--------------------------------|--------------------------------
* = uses fixup manipulator to work on this platform
P = provisioner manipulator available

Another is when you forgot to set-wan

$ appstore-list                                
Lists not downloaded, will attempt to download
curl: (6) Could not resolve host: archive.traverse.com.au
registry        |appliance id                    |description                     
----------------|--------------------------------|--------------------------------
* = uses fixup manipulator to work on this platform
P = provisioner manipulator available

The script probably isn’t checking errors as it still attempts shows information. Perhaps the command should fail and not display the following when it fails:

registry        |appliance id                    |description                     
----------------|--------------------------------|--------------------------------
* = uses fixup manipulator to work on this platform
P = provisioner manipulator available

I’d be happy to look at the script, and contribute fixes if you could share where it’s located and how to test it on one of my hosts.

I’m aware of these and hope to work on them in the new year. The main reason for the poor handling is that the programs invoke curl to do their operations, it would be better if they use libcurl so they can get failure information from curl directly.

As the appstore is written in Lua this would involve using something like Lua-cURL

Issues related to the hardware clock being out of sync is one I want to add better checking for. I have a change to the recovery firmware queued to make it do an NTP sync faster after a ‘WAN’ connection comes online and it would not hurt to check the RTC status when invoking appstore-list as well.

The code for these lives in https://gitlab.com/traversetech/ls1088firmware/recovery-ramdisk and muvirt-feed if your interested in hacking on them.