diff options
author | Randy Witt <randy.e.witt@linux.intel.com> | 2015-09-16 14:45:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-21 15:20:06 +0100 |
commit | 78f5c3cb3971c31a950deb5cab8992f3ba577440 (patch) | |
tree | 2960f75ce342206fa4148c2fbd392de3a59b7fb1 /meta | |
parent | de51069343b86b63d4c8f668b59c404f29c88812 (diff) | |
download | openembedded-core-78f5c3cb3971c31a950deb5cab8992f3ba577440.tar.gz openembedded-core-78f5c3cb3971c31a950deb5cab8992f3ba577440.tar.bz2 openembedded-core-78f5c3cb3971c31a950deb5cab8992f3ba577440.zip |
testimage.bbclass: Don't require an image manifest
Sometimes an "image" may not actually have a manifest file such as when
using a "baremetal kernel". This change allows for a user to set a
IMAGE_NO_MANIFEST flag to 1 in order to inform the code that there is no
corresponding manifest that should exist for an image.
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/testimage.bbclass | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index a1918ba9ec..70e28004fe 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -279,14 +279,20 @@ def testimage_main(d): self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest") + nomanifest = d.getVar("IMAGE_NO_MANIFEST", True) + self.sigterm = False self.origsigtermhandler = signal.getsignal(signal.SIGTERM) signal.signal(signal.SIGTERM, self.sigterm_exception) - try: - with open(manifest) as f: - self.pkgmanifest = f.read() - except IOError as e: - bb.fatal("No package manifest file found. Did you build the image?\n%s" % e) + + if nomanifest is None or nomanifest != "1": + try: + with open(manifest) as f: + self.pkgmanifest = f.read() + except IOError as e: + bb.fatal("No package manifest file found. Did you build the image?\n%s" % e) + else: + self.pkgmanifest = "" def sigterm_exception(self, signum, stackframe): bb.warn("TestImage received SIGTERM, shutting down...") |