do_install and do_package both run under fakeroot (pseudo), which keeps
pseudo's ownership/inode database in sync with what is actually on disk
under D. do_vendor_unlink runs between them but was never marked
fakeroot, so its os.unlink() of the vendor symlink happened outside of
pseudo's view: the file disappeared from disk but pseudo's database
still held a stale record for that path/inode.
The next fakeroot task to touch that path (do_package) then finds the
on-disk state and pseudo's database disagreeing, and pseudo aborts with
"path mismatch" / "inode mismatch" errors, failing do_package.
Mark do_vendor_unlink fakeroot, matching do_install and do_package, so
its filesystem operations are tracked by pseudo consistently.
Signed-off-by: John Ripple <john.ripple@keysight.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
return src_uri
-python do_vendor_unlink() {
+fakeroot python do_vendor_unlink() {
go_import = d.getVar('GO_IMPORT')
linkname = os.path.join(d.getVar('D') + d.getVar('libdir'), 'go', 'src', go_import, 'vendor')
if os.path.islink(linkname):
os.unlink(linkname)
}
+do_vendor_unlink[depends] += "virtual/fakeroot-native:do_populate_sysroot"
addtask vendor_unlink before do_package after do_install
python do_go_vendor() {