mirror of
https://git.yoctoproject.org/poky
synced 2026-07-16 15:57:04 +00:00
image.bbclass: preserve debugfs tarball with checksum fstype
Previously, when adding checksum fstypes to IMAGE_FSTYPES_DEBUGFS, e.g. IMAGE_FSTYPES_DEBUGFS = "tar.bz2 tar.bz2.sha256sum", only the checksum file remained in DEPLOY_DIR while the tarball file was removed. The underlying issue was that inside gen_conversion_cmds, removing the debugfs_ prefix from type broke the comparison with alltypes where the prefix was expected. (From OE-Core rev: 560c7676b81fb344b7db538d65973a49807ab140) Signed-off-by: Manuel Leonhardt <mleonhardt@arri.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a1bd1174ce
commit
ffe0aa9cda
@@ -481,6 +481,7 @@ python () {
|
|||||||
for ctype in sorted(ctypes):
|
for ctype in sorted(ctypes):
|
||||||
if bt.endswith("." + ctype):
|
if bt.endswith("." + ctype):
|
||||||
type = bt[0:-len(ctype) - 1]
|
type = bt[0:-len(ctype) - 1]
|
||||||
|
original_type = type
|
||||||
if type.startswith("debugfs_"):
|
if type.startswith("debugfs_"):
|
||||||
type = type[8:]
|
type = type[8:]
|
||||||
# Create input image first.
|
# Create input image first.
|
||||||
@@ -493,7 +494,7 @@ python () {
|
|||||||
subimage = type + "." + ctype
|
subimage = type + "." + ctype
|
||||||
if subimage not in subimages:
|
if subimage not in subimages:
|
||||||
subimages.append(subimage)
|
subimages.append(subimage)
|
||||||
if type not in alltypes:
|
if original_type not in alltypes:
|
||||||
rm_tmp_images.add(localdata.expand("${IMAGE_NAME}.${type}"))
|
rm_tmp_images.add(localdata.expand("${IMAGE_NAME}.${type}"))
|
||||||
|
|
||||||
for bt in basetypes[t]:
|
for bt in basetypes[t]:
|
||||||
|
|||||||
@@ -277,16 +277,19 @@ SKIP_RECIPE[busybox] = "Don't build this"
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
image = 'core-image-minimal'
|
image = 'core-image-minimal'
|
||||||
image_fstypes_debugfs = 'tar.bz2'
|
config = """
|
||||||
features = 'IMAGE_GEN_DEBUGFS = "1"\n'
|
IMAGE_GEN_DEBUGFS = "1"
|
||||||
features += 'IMAGE_FSTYPES_DEBUGFS = "%s"\n' % image_fstypes_debugfs
|
IMAGE_FSTYPES_DEBUGFS = "tar.bz2 tar.bz2.sha256sum"
|
||||||
self.write_config(features)
|
"""
|
||||||
|
self.write_config(config)
|
||||||
|
|
||||||
bitbake(image)
|
bitbake(image)
|
||||||
bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
|
bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
|
||||||
|
|
||||||
dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.%s" % (bb_vars['IMAGE_LINK_NAME'], image_fstypes_debugfs))
|
dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME'])
|
||||||
self.assertTrue(os.path.exists(dbg_tar_file), 'debug filesystem not generated at %s' % dbg_tar_file)
|
self.assertTrue(os.path.exists(dbg_tar_file), 'debug filesystem not generated at %s' % dbg_tar_file)
|
||||||
|
dbg_tar_sha_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2.sha256sum" % bb_vars['IMAGE_LINK_NAME'])
|
||||||
|
self.assertTrue(os.path.exists(dbg_tar_sha_file), 'debug filesystem sha256sum not generated at %s' % dbg_tar_sha_file)
|
||||||
result = runCmd('cd %s; tar xvf %s' % (bb_vars['DEPLOY_DIR_IMAGE'], dbg_tar_file))
|
result = runCmd('cd %s; tar xvf %s' % (bb_vars['DEPLOY_DIR_IMAGE'], dbg_tar_file))
|
||||||
self.assertEqual(result.status, 0, msg='Failed to extract %s: %s' % (dbg_tar_file, result.output))
|
self.assertEqual(result.status, 0, msg='Failed to extract %s: %s' % (dbg_tar_file, result.output))
|
||||||
result = runCmd('find %s -name %s' % (bb_vars['DEPLOY_DIR_IMAGE'], "udevadm"))
|
result = runCmd('find %s -name %s' % (bb_vars['DEPLOY_DIR_IMAGE'], "udevadm"))
|
||||||
|
|||||||
Reference in New Issue
Block a user