Bug 13913

Summary: dpkg-deb: tar: file changed as we read it errors
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Paul Eggleton <bluelightning>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 3.2 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Log excerpt of failure none

Description Paul Eggleton 2020-05-20 15:09:12 UTC
Created attachment 4681 [details]
Log excerpt of failure

I'm currently seeing a repeatable "tar: file changed as we read it" failure in do_package_write_deb (log attached). Addition of logging "ls -l" before and after does not indicate any outward changes to the file, however when I did some searching I found that there was a patch added some time ago that should completely prevent this type of error from causing the task to fail:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40731942515ec8d80c727ad561174986d4f05818

This patch was later renamed, and then the renamed patch was removed in the following commit:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=81b59a19ad6df490f1edbea70b2612d7a8e43164

The latter suggests that the patch was merged upstream in the following commit:

https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=7a91341446851cd3594a8b752823b8c1f26d652a

However, the indicated upstream commit appears to be a refactoring and does not specially handle a return of 1 from tar at all, so it seems to me that this patch possibly should have been rebased rather than removed. I could be missing something however, and it's possible that the patch is no longer needed in the general case.
Comment 1 Richard Purdie 2020-05-20 16:13:50 UTC
I suspect we need to add the patch. Could you do that Paul?
Comment 2 Paul Eggleton 2020-05-21 15:03:04 UTC
Will do.