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 <Lindley.Vieira@windriver.com>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user