ptest: ensure do_install_ptest_base task runs in fakeroot context
PATCH 1/1 ptest: ensure do_install_ptest_base task runs in fakeroot context
As this task is installing files into $D it needs to run inside pseudo so that special permissions and owners are preserved.
Signed-off-by Ross Burton <[email protected]>
--- meta/classes/ptest.bbclass | 5 +++++ 1 file changed, 5 insertions(+)
meta/classes/ptest.bbclass +5 -0
@@ -53,3 +53,8 @@ do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}" addtask configure_ptest_base after do_configure before do_compile addtask compile_ptest_base after do_compile before do_install addtask install_ptest_base after do_install before do_package + +python () { + if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): + d.setVarFlag('do_install_ptest_base', 'fakeroot', 1) +}
Signature · 1 line
1.7.10.4
I should add that this fixes problems like systemd failing rebuilds with crazy errors like:
| tar: sysroot-destdir/usr/lib/systemd/ptest/test/sys/module/uhci_hcd/drivers/pci\:uhci_hcd:
Cannot open: Permission denied
Ross
Quoted 24 lines · Ross Burton
As this task is installing files into $D it needs to run inside pseudo so that special permissions and owners are preserved.
Signed-off-by Ross Burton <[email protected]>--- meta/classes/ptest.bbclass | 5 +++++ 1 file changed, 5 insertions(+)meta/classes/ptest.bbclass +5
-1@@ -53,3 +53,8 @@ do_install_ptest_base[cleandirs] = "${D}${PTEST_PATH}" addtask configure_ptest_base after do_configure before do_compile addtask compile_ptest_base after do_compile before do_install addtask install_ptest_base after do_install before do_package + +python () { + if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): + d.setVarFlag('do_install_ptest_base', 'fakeroot', 1) +} --1.7.10.4