From 1f4d1781c9a521f7d0a9b356e2aa9dab4f8b5237 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sat, 31 Oct 2015 21:42:04 +0000 Subject: classes/opie: fix ownership of files installed in do_opie_install We're adding our own install task here, this needs to be marked as fakeroot so that it runs under pseudo and thus files are installed as root. In the process I discovered that a function exported with EXPORT_FUNCTIONS marked as fakeroot doesn't actually end up as a fakeroot task - you have to force it using d.setVarFlag() from anonymous python; this is probably a bug in BitBake. Signed-off-by: Paul Eggleton --- classes/opie.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/opie.bbclass b/classes/opie.bbclass index d48acb2..21dc581 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -34,7 +34,7 @@ do_configure_prepend() { # qmake should care about all the details then. qmake can do that, i know it :) # -python opie_do_opie_install() { +fakeroot python opie_do_opie_install() { import os, shutil section = bb.data.getVar( "SECTION", d ).split( '/' )[1] or "Applications" section = section.title() @@ -105,3 +105,8 @@ python opie_do_opie_install() { EXPORT_FUNCTIONS do_opie_install addtask opie_install after do_install before do_populate_sysroot do_package + +python() { + # FIXME apparently it's not enough to set fakeroot on the exported function + d.setVarFlag('do_opie_install', 'fakeroot', '1') +} -- cgit 1.2.3-korg