pohly / meta-swupd

An experimental and now abandoned fork of http://git.yoctoproject.org/cgit/cgit.cgi/meta-swupd/ - do not use in production!
MIT License
2 stars 2 forks source link

bsdtar error "Not found in archive" #3

Open aaronovz1 opened 7 years ago

aaronovz1 commented 7 years ago

Every so often when I make a change to some recipes, add new packages, etc. I get this error from bsdtar about a file "Not found in archive". The file is never the same each time I have seen this problem. Has anyone seen this before? Is there a safe way to resolve this without deleting the entire tmp directory?

ERROR: orion-image-default-1.0-r0 do_image: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_image(d)
     0003:
File: '/media/data/yp2.3/meta/classes/image.bbclass', lineno: 281, function: do_image
     0277:addtask rootfs before do_build after do_prepare_recipe_sysroot
     0278:
     0279:fakeroot python do_image () {
     0280:    from oe.utils import execute_pre_post_process
 *** 0281:
     0282:    pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND")
     0283:
     0284:    execute_pre_post_process(d, pre_process_cmds)
     0285:}
File: '/media/data/yp2.3/meta-swupd/lib/swupd/rootfs.py', lineno: 70, function: create_rootfs
     0066:            rootfs_contents.update(manifest_to_file_list(parts[0] + ('bundle-%s-%s' % (pn_base, bundle)) + parts[1] + '/swupd' + suffix))
     0067:
     0068:    mega_archive = d.getVar('MEGA_IMAGE_ARCHIVE', True)
     0069:    bb.debug(2, 'Re-copying rootfs contents from mega image %s to %s' % (mega_archive, rootfs))
 *** 0070:    copyxattrfiles(d, rootfs_contents, mega_archive, rootfs)
     0071:
     0072:    deploy_dir = d.getVar('IMGDEPLOYDIR', True)
     0073:    link_name = d.getVar('IMAGE_LINK_NAME', True)
     0074:    # Create .rootfs.manifest for bundle images as the union of all
File: '/media/data/yp2.3/meta-swupd/lib/swupd/path.py', lineno: 54, function: copyxattrfiles
     0050:            bb.fatal('Extracting files from an archive and writing into an archive not implemented yet.')
     0051:        else:
     0052:            cmd = "bsdtar --no-recursion -C %s -xf %s -T %s" % (dst, src, copyfile)
     0053:    try:
 *** 0054:        output = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
     0055:        if output:
     0056:            bb.fatal('Unexpected output from the following command:\n%s\n%s' % (cmd, output))
     0057:    finally:
     0058:        os.remove(copyfile)
File: '/usr/lib/python3.5/subprocess.py', lineno: 626, function: check_output
     0622:        # empty string. That is maintained here for backwards compatibility.
     0623:        kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
     0624:
     0625:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
 *** 0626:               **kwargs).stdout
     0627:
     0628:
     0629:class CompletedProcess(object):
     0630:    """A process that has finished running.
File: '/usr/lib/python3.5/subprocess.py', lineno: 708, function: run
     0704:            raise
     0705:        retcode = process.poll()
     0706:        if check and retcode:
     0707:            raise CalledProcessError(retcode, process.args,
 *** 0708:                                     output=stdout, stderr=stderr)
     0709:    return CompletedProcess(process.args, retcode, stdout, stderr)
     0710:
     0711:
     0712:def list2cmdline(seq):
Exception: subprocess.CalledProcessError: Command 'bsdtar --no-recursion -C /media/data/yp2.3/build/orion/tmp-glibc/work/orion_64-oe-linux/orion-image-default/1.0-r0/rootfs -xf /media/data/yp2.3/build/orion/tmp-glibc/work/orion_64-oe-linux/bundle-orion-image-mega/1.0-r0/rootfs.tar -T /media/data/yp2.3/build/orion/tmp-glibc/work/orion_64-oe-linux/orion-image-default/1.0-r0/tmp7upn1qxn' returned non-zero exit status 1

Subprocess output:
bsdtar: etc/ssl/certs/ae8153b9.1: Not found in archive
bsdtar: Error exit delayed from previous errors.

ERROR: orion-image-default-1.0-r0 do_image: Function failed: do_image
ERROR: Logfile of failure stored in: /media/data/yp2.3/build/orion/tmp-glibc/work/orion_64-oe-linux/orion-image-default/1.0-r0/temp/log.do_image.5904
ERROR: Task (virtual:swupdimage:default:/media/data/yp2.3/meta-sm/meta-orion/recipes-orion/images/orion-image.bb:do_image) failed with exit code '1'
pohly commented 7 years ago

Does tmp-glibc/work/orion_64-oe-linux/bundle-orion-image-mega/1.0-r0/rootfs/etc/ssl/certs/ae8153b9.1 exist? Is it in tmp-glibc/work/orion_64-oe-linux/bundle-orion-image-mega/1.0-r0/rootfs.tar or is it really missing?

Somehow the tmp-glibc/work/orion_64-oe-linux/bundle-orion-image-mega/1.0-r0/rootfs does not contain etc/ssl/certs/ae8153b9.1 although tmp-glibc/work/orion_64-oe-linux/orion-image-default/1.0-r0/rootfs did.

Which other tasks where running during this build? In particular bundle-orion-image-mega.do_rootfs and bundle-orion-image-mega.do_mega_image are of interest. The latter should have completed before orion-image-default.do_image.

You can do "bitbake -c clean bundle-orion-image-mega" and then re-try.

aaronovz1 commented 7 years ago

I messed up some stuff trying to fix it and had to delete tmp so I can't answer the first couple questions unfortunately. I'll check these things when I see the issue again.

As for using the clean command, I had tried that on a number targets, bundle-orion-image-mega, orion-image, orion-image-default, etc. Didn't seem to fix it - although I think in the past sometimes it had resolved it.