Skip to contentSkip to conversation

package.py: OEHasPackage: Add MLPREFIX to packagename

PATCH New Saul Wold 1 participant 1 message Dec 24, 2023

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 package.py: OEHasPackage: Add MLPREFIX to packagename

FIXES [YOCTO #12342]

When testing a Multilib image, the package manifest list contains the fully qualified package name which includes the Multilib Prefix. This patch adds the MLPREFIX to the package names that are passed into the @OEHasPackage() decorator to ensure the set isdisjoint() matches correctly.

---
Tested with a lib32 image and without

 meta/lib/oeqa/runtime/decorator/package.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/lib/oeqa/runtime/decorator/package.py +3 -2
index 8aba3f325bc..b78ac9fc388 100644
@@ -38,11 +38,12 @@ class OEHasPackage(OETestDecorator):
         if isinstance(self.need_pkgs, str):
             self.need_pkgs = [self.need_pkgs,]
 
+        mlprefix = self.case.td.get("MLPREFIX")
         for pkg in self.need_pkgs:
             if pkg.startswith('!'):
-                unneed_pkgs.add(pkg[1:])
+                unneed_pkgs.add(mlprefix + pkg[1:])
             else:
-                need_pkgs.add(pkg)
+                need_pkgs.add(mlprefix + pkg)
 
         if unneed_pkgs:
             msg = 'Checking if %s is not installed' % ', '.join(unneed_pkgs)
Signature · 1 line
2.34.1