summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2019-01-06 19:13:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-11 10:39:09 +0000
commit18c1b63cb2d317f6f60ab19c65b16f330f8ceb0a (patch)
tree9559e5797e8c173872a4a0879561509b51fdf261 /meta/classes/buildhistory.bbclass
parentfbc8f2fb6649a1688885f999febf180ff53fb055 (diff)
downloadpoky-18c1b63cb2d317f6f60ab19c65b16f330f8ceb0a.tar.gz
buildhistory: simplify buildhistory_list_files()
Avoid duplicating shell code for the two cases, fakeroot/non-fakeroot. (From OE-Core rev: c4a931df28f45f95f19a13062b8dc38db60da342) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index d1f3e6aa82..33eb1b00f6 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -519,12 +519,14 @@ buildhistory_get_sdk_installed_target() {
519 519
520buildhistory_list_files() { 520buildhistory_list_files() {
521 # List the files in the specified directory, but exclude date/time etc. 521 # List the files in the specified directory, but exclude date/time etc.
522 # This awk script is somewhat messy, but handles where the size is not printed for device files under pseudo 522 # This is somewhat messy, but handles where the size is not printed for device files under pseudo
523 ( cd $1
524 find_cmd='find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n"'
523 if [ "$3" = "fakeroot" ] ; then 525 if [ "$3" = "fakeroot" ] ; then
524 ( cd $1 && ${FAKEROOTENV} ${FAKEROOTCMD} find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 ) 526 eval ${FAKEROOTENV} ${FAKEROOTCMD} $find_cmd
525 else 527 else
526 ( cd $1 && find . ! -path . -printf "%M %-10u %-10g %10s %p -> %l\n" | sort -k5 | sed 's/ * -> $//' > $2 ) 528 eval $find_cmd
527 fi 529 fi | sort -k5 | sed 's/ * -> $//' > $2 )
528} 530}
529 531
530buildhistory_list_pkg_files() { 532buildhistory_list_pkg_files() {