mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[flatpak] able to differentiate system and user updates for Flatpak >= 1.5
This commit is contained in:
@@ -115,14 +115,17 @@ class FlatpakManager(SoftwareManager):
|
||||
|
||||
if update_map and (update_map['full'] or update_map['partial']):
|
||||
if version >= '1.5.0':
|
||||
update_id = '{}/{}'.format(app_json['id'], app_json['branch'])
|
||||
update_id = '{}/{}/{}'.format(app_json['id'], app_json['branch'], app_json['installation'])
|
||||
|
||||
if update_map['full'] and update_id in update_map['full']:
|
||||
model.update = True
|
||||
|
||||
if update_map['partial']:
|
||||
for partial in update_map['partial']:
|
||||
if app_json['id'] in partial and '/' + app_json['branch'] in partial:
|
||||
partial_data = partial.split('/')
|
||||
if app_json['id'] in partial_data[0] and\
|
||||
app_json['branch'] == partial_data[1] and\
|
||||
app_json['installation'] == partial_data[2]:
|
||||
partial_model = model.gen_partial(partial.split('/')[0])
|
||||
partial_model.update = True
|
||||
models.append(partial_model)
|
||||
|
||||
Reference in New Issue
Block a user