From 17bc074e0cf8c1bb4005a8d0883c6dc3a9a36c95 Mon Sep 17 00:00:00 2001 From: Lindley Werner Date: Mon, 10 Jun 2024 12:59:29 -0300 Subject: [PATCH] Fix no valid packages found The packages argument arrives at install as a one-element tuple with all packages e.g. packages = ('dm-monitor logmgmt',). When the code iterates through it to validate the packages, the packages' names are not split. This fix gets the elements from the packages tuple and splits it to get all package names. Test plan: PASS 'software deploy start' a patch with more than one package. PASS 'software deploy start' a patch with one package. PASS 'software deploy start' a patch with zero package. Story: 2010867 Task: 50302 Change-Id: I16b4210e8fa9901cc5a75fee219e3e4903ec36da Signed-off-by: Lindley Werner --- apt_ostree/apt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apt_ostree/apt.py b/apt_ostree/apt.py index 094fdfa..9e69582 100644 --- a/apt_ostree/apt.py +++ b/apt_ostree/apt.py @@ -94,6 +94,8 @@ class Apt: def check_valid_packages(self, cache, packages): """Check for existing package.""" pkgs = [] + packages = [pack for item in packages for pack in item.split()] + for package in packages: if package in cache: pkg = self.apt_package(cache, package)