[PATCH 10/23] oeqa/runtime/decorator/package.py: remove use of strToSet

Ross Burton
2022-03-31T18:29:23Z

There's no need to use a series of over-generalised functions to just
wrap a string in a tuple.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/lib/oeqa/runtime/decorator/package.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/decorator/package.py b/meta/lib/oeqa/runtime/decorator/package.py
index 2d7e174dbfd..8aba3f325bc 100644
--- a/meta/lib/oeqa/runtime/decorator/package.py
+++ b/meta/lib/oeqa/runtime/decorator/package.py
@@ -5,7 +5,6 @@
#

from oeqa.core.decorator import OETestDecorator, registerDecorator
-from oeqa.core.utils.misc import strToSet

@registerDecorator
class OEHasPackage(OETestDecorator):
@@ -34,8 +33,12 @@ class OEHasPackage(OETestDecorator):
def setUpDecorator(self):
need_pkgs = set()
unneed_pkgs = set()
- pkgs = strToSet(self.need_pkgs)
- for pkg in pkgs:
+
+ # Turn literal strings into a list so we can just iterate over it
+ if isinstance(self.need_pkgs, str):
+ self.need_pkgs = [self.need_pkgs,]
+
+ for pkg in self.need_pkgs:
if pkg.startswith('!'):
unneed_pkgs.add(pkg[1:])
else:
--
2.25.1