From 711fa3aa736c7f7a2ac7553638d7134d9b480ec1 Mon Sep 17 00:00:00 2001 From: Mike Sul Date: Tue, 5 Mar 2024 10:09:04 +0100 Subject: [PATCH] assemble: Create set out of the target apps If shortlist is not specified then a set containing target apps should be created to determine a set of the previously fetched app and the set of apps to fetch. Signed-off-by: Mike Sul --- assemble.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assemble.py b/assemble.py index 6424ef9f..6f43c08a 100755 --- a/assemble.py +++ b/assemble.py @@ -283,9 +283,9 @@ def check_and_get_fetched_apps_uri(target: FactoryClient.Target, shortlist: [str x.strip() for x in fetched_apps_str.split(',') if x) else: # if `shortlist` is not defined or empty then all target apps were fetched - fetched_apps = [x[0] for x in target.apps()] + fetched_apps = set(app[0] for app in target.apps()) - apps_to_fetch = set(shortlist) if shortlist else set(target.apps().keys()) + apps_to_fetch = set(shortlist) if shortlist else set(app[0] for app in target.apps()) if fetched_apps.issubset(apps_to_fetch): # if the previously fetched apps is a sub-set of the apps to be fetched then