summaryrefslogtreecommitdiff
path: root/libre/iceweasel/process-json-files.py
diff options
context:
space:
mode:
authorgrizzlyuser <grizzlyuser@protonmail.com>2021-08-11 10:11:13 +0300
committerbill-auger <mr.j.spam.me@gmail.com>2021-09-19 19:23:00 -0400
commit693857d1dd2ddbf7fbe5d0928641f2d47008c21d (patch)
treed05d2a5cf33e7f5f5a352f3fc5af1b965fc7e2be /libre/iceweasel/process-json-files.py
parent7f876914ebff4f6ae3e43be3ec651eabd334843c (diff)
libre/iceweasel: 91.0
Update according to latest changes from upstreams. Rename patches to reflect they're related to FSDG. Sort records in Remote Settings JSON dumps, since this is expected by upstream. identity-icons-brand.svg has been removed upstream, yet Arch Linux added it to their VCS repo, to be used as "symbolic" application icon in some DEs. As it looks like we don't have this icon for Iceweasel, let's just drop it for now. If anybody is not happy about the missing icon, it can be added later.
Diffstat (limited to 'libre/iceweasel/process-json-files.py')
-rw-r--r--libre/iceweasel/process-json-files.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libre/iceweasel/process-json-files.py b/libre/iceweasel/process-json-files.py
index ebda48ede..89e2960f5 100644
--- a/libre/iceweasel/process-json-files.py
+++ b/libre/iceweasel/process-json-files.py
@@ -75,6 +75,8 @@ class RemoteSettings:
@classmethod
def process_raw(cls, unwrapped_jsons, parsed_schema):
timestamps, result = [], []
+ last_modified_key_name = 'last_modified'
+
for collection in unwrapped_jsons:
should_modify_collection = cls.should_modify_collection(collection)
for record in collection.content:
@@ -91,13 +93,14 @@ class RemoteSettings:
while timestamp in timestamps:
timestamp += 1
timestamps.append(timestamp)
- record['last_modified'] = timestamp
+ record[last_modified_key_name] = timestamp
if parsed_schema is not None:
validate(record, schema=parsed_schema)
result.append(record)
+ result.sort(key=lambda record: record[last_modified_key_name], reverse=True)
cls.OUTPUT_PATH.parent.mkdir(parents=True, exist_ok=True)
return File(cls.OUTPUT_PATH, result)