]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
package.py: OEHasPackage: Add MLPREFIX to packagename
authorSaul Wold <sgw@bigsur.com>
Sun, 24 Dec 2023 01:12:07 +0000 (17:12 -0800)
committerSteve Sakoman <steve@sakoman.com>
Fri, 26 Jan 2024 14:58:49 +0000 (04:58 -1000)
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.

Signed-off-by: Saul Wold <sgw@bigsur.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit ab87e4f92305b2a664cc473869e1615cf56e0936)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/runtime/decorator/package.py

index 8aba3f325bcfe18017355bb91be7a91ae8ea0441..b78ac9fc38845249e76489e4d87abc3c92ee50b7 100644 (file)
@@ -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)