-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eupgrade is_new_version_available always will return false #1069
Comments
Yes, it is indeed a bug. I dont remember exactly why now, I believe that when I wrote the code the implementation was to not cache by default. But I think that the we rush to make a release and the lime app was not providing the cached_only property and it was asking for this data on app load so it was very slow to start so I hardcoded the value in eupgrade.lua and forgot about it. And as upgrades we were doing in communities were rolling slowly nee releases it was "ok" to load new firmware info only once per boot. I think it is better to have cached_only default to false. Or to change the scripts in bin/ |
I created a PR. What do you think to add a function to get the cached only new version available? Could be useful? Probably the refactor to adapt limeapp will be to much bigger compared to the functionality added. I mean, if we would like to take advantage to call cache only or not, we have to refactor a lot of parts maybe. |
I noticed that if I use the RPC call:
It will always return false (actually something like
{"status":"ok"})
. This is because of the RPC function will always ask for cached latest versions:https://github.com/libremesh/lime-packages/blob/master/packages/eupgrade/files/usr/libexec/rpcd/eupgrade#L19-L30
The relevant code here is
local cached_only = true
, which mean, that on the function that check if new version is available, it check the cahced latest version, and i none, return false. https://github.com/libremesh/lime-packages/blob/master/packages/eupgrade/files/usr/lib/lua/eupgrade.lua#L68-L70I didn't find any place on the packages where actually look the non cached
eupgrade.is_new_version_available
, but maybe I am missing something. How can i force to download new information?@spiccinini is this really an error?
I'll propose to set the
local cached_only = true
as default, but with the ability to call theis_new_version_available
with a parameter to override it:The text was updated successfully, but these errors were encountered: