summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-11-28 15:27:00 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-03 12:50:49 +0000
commitf57c83fc33583c140f668946f3f3e79b960aa9ee (patch)
tree49ac8e2c698812a28fe40169778620f46d8a3cc8 /meta
parent8408a7700cd9cab4559ddae0bbe57f0d7fae5c37 (diff)
downloadopenembedded-core-f57c83fc33583c140f668946f3f3e79b960aa9ee.tar.gz
openembedded-core-f57c83fc33583c140f668946f3f3e79b960aa9ee.tar.bz2
openembedded-core-f57c83fc33583c140f668946f3f3e79b960aa9ee.zip
lib/oeqa: use the new manifest file for determining if a package is installed
Use the new manifest file instead of ${WORKDIR}/installed_pkgs.txt for determining if an image has a certain package, because installed_pkgs.txt goes away with rm_work enabled. We can't use the IMAGE_MANIFEST var for the file path because that relies on IMAGE_NAME which changes at every run (because of date), so we use the link which points to the last one built. [ YOCTO #5072 ] Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/oetest.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 3bb3589468..95661506e3 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -56,17 +56,11 @@ class oeTest(unittest.TestCase):
@classmethod
def hasPackage(self, pkg):
-
- pkgfile = os.path.join(oeTest.tc.d.getVar("WORKDIR", True), "installed_pkgs.txt")
-
- with open(pkgfile) as f:
- data = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
- match = re.search(pkg, data)
- data.close()
-
- if match:
+ manifest = os.path.join(oeTest.tc.d.getVar("DEPLOY_DIR_IMAGE", True), oeTest.tc.d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
+ with open(manifest) as f:
+ data = f.read()
+ if re.search(pkg, data):
return True
-
return False
@classmethod