summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-26 14:21:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:34:38 +0100
commit1380aa333ed90559f4a24d52aefc52cadb60646c (patch)
tree13f4933796c3805fe14eebd9b9747e12e74dca27
parent6f3992728613c39403ef59bbcf1cb67d9e8c526b (diff)
downloadopenembedded-core-1380aa333ed90559f4a24d52aefc52cadb60646c.tar.gz
openembedded-core-1380aa333ed90559f4a24d52aefc52cadb60646c.tar.bz2
openembedded-core-1380aa333ed90559f4a24d52aefc52cadb60646c.zip
classes/buildhistory: fix permissions in package file listing
If we want the correct file permissions to show up here as they would on the target, we need to run the command under pseudo. Normally we'd set the fakeroot varflag on the function and that would be enough, but it turns out that setting fakeroot on a non-task function that you execute using bb.build.exec_func() isn't working at the moment. Work around this by simply using FAKEROOTENV and FAKEROOTCMD. Unfortunately that means we have to duplicate the command for the two cases but I couldn't find a better means of doing that that actually works. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/classes/buildhistory.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 3d459c715a..190c38e114 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -435,7 +435,11 @@ buildhistory_get_sdk_installed_target() {
buildhistory_list_files() {
# List the files in the specified directory, but exclude date/time etc.
# This awk script is somewhat messy, but handles where the size is not printed for device files under pseudo
- ( cd $1 && find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 )
+ if [ "$3" = "fakeroot" ] ; then
+ ( cd $1 && ${FAKEROOTENV} ${FAKEROOTCMD} find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 )
+ else
+ ( cd $1 && find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 )
+ fi
}
buildhistory_list_pkg_files() {
@@ -449,7 +453,7 @@ buildhistory_list_pkg_files() {
bbdebug 2 "Folder $outfolder does not exist, file $outfile not created"
continue
fi
- buildhistory_list_files ${pkgdir} ${outfile}
+ buildhistory_list_files $pkgdir $outfile fakeroot
done
}