]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/install: keep the order of pkgs to be installed 1243/head
authorKefu Chai <kchai@redhat.com>
Mon, 10 Dec 2018 14:50:38 +0000 (22:50 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 10 Dec 2018 14:50:39 +0000 (22:50 +0800)
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 <kchai@redhat.com>
teuthology/task/install/__init__.py

index 9adc099ffc001ad7577ed8103c371c2c077985c3..8386a6bea7594819066edb54b2e8cd9212b3860e 100644 (file)
@@ -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):