Ubuntu Pastebin

Paste from smoser at Mon, 23 Oct 2017 20:07:11 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
diff --git a/tools/read-dependencies b/tools/read-dependencies
index 421f470a..217e5cf1 100755
--- a/tools/read-dependencies
+++ b/tools/read-dependencies
@@ -238,9 +238,11 @@ def main(distro):
 def pkg_install(pkg_list, distro, test_distro=False, dry_run=False):
     """Install a list of packages using the DISTRO_INSTALL_PKG_CMD."""
     if test_distro:
-        pkg_list = list(pkg_list) + CI_SYSTEM_BASE_PKGS['common']
-        distro_base_pkgs = CI_SYSTEM_BASE_PKGS.get(distro, [])
-        pkg_list += distro_base_pkgs
+        ci_pkgs = [p for p in
+                   CI_SYSTEM_BASE_PKGS['common'] +
+                   CI_SYSTEM_BASE_PKGS.get(distro, [])
+                   if p not in pkg_list]
+        pkg_list = list(pkg_list) + ci_pkgs
     print('Installing deps: {0}{1}'.format(
           '(dryrun)' if dry_run else '', ' '.join(pkg_list)))
     install_cmd = []
Download as text