From c4f3fafb50946be8ba3607ba1bd3dc1fbf1be402 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 10 Dec 2018 22:50:38 +0800 Subject: [PATCH] task/install: keep the order of pkgs to be installed before this change, the package list to be installed are ordered by the hash function used by set(). after this change, the order of packages are not changed. so we can ensure the order of package installation is the identical to that of package list in yaml. Signed-off-by: Kefu Chai --- teuthology/task/install/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teuthology/task/install/__init__.py b/teuthology/task/install/__init__.py index 9adc099ffc..8386a6bea7 100644 --- a/teuthology/task/install/__init__.py +++ b/teuthology/task/install/__init__.py @@ -201,7 +201,7 @@ def get_package_list(ctx, config): rpms = filter(lambda p: not p.endswith('-debuginfo'), rpms) def exclude(pkgs, exclude_list): - return list(set(pkgs).difference(set(exclude_list))) + return list(pkg for pkg in pkgs if pkg not in exclude_list) excluded_packages = config.get('exclude_packages', []) if isinstance(excluded_packages, dict): -- 2.39.5