mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
[fix] modify state of a cached app if it has changed
This commit is contained in:
parent
678461a962
commit
aac22e90f6
1 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,9 @@ for app, info in apps_list.items():
|
||||||
# Store usefull values
|
# Store usefull values
|
||||||
app_url = info['url']
|
app_url = info['url']
|
||||||
app_rev = info['revision']
|
app_rev = info['revision']
|
||||||
|
app_state = info["state"]
|
||||||
|
|
||||||
|
previous_state = already_built_file.get(app, {}).get("state", {})
|
||||||
|
|
||||||
manifest = {}
|
manifest = {}
|
||||||
timestamp = None
|
timestamp = None
|
||||||
|
@ -91,6 +94,9 @@ for app, info in apps_list.items():
|
||||||
if previous_rev == app_rev and previous_url == app_url:
|
if previous_rev == app_rev and previous_url == app_url:
|
||||||
print("%s[%s] is already up to date in target output, ignore" % (app, app_rev))
|
print("%s[%s] is already up to date in target output, ignore" % (app, app_rev))
|
||||||
result_dict[app] = already_built_file[app]
|
result_dict[app] = already_built_file[app]
|
||||||
|
if previous_state != app_state:
|
||||||
|
result_dict[app]["state"] = app_state
|
||||||
|
print("... but has changed of state, updating it from '%s' to '%s'" % (previous_state, app_state))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Hosted on GitHub
|
# Hosted on GitHub
|
||||||
|
|
Loading…
Add table
Reference in a new issue