diff options
-rw-r--r-- | meta/classes/base.bbclass | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index f88d32041b..dc5cb03fc4 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -368,6 +368,25 @@ oe_libinstall() { | |||
368 | __runcmd cd "$olddir" | 368 | __runcmd cd "$olddir" |
369 | } | 369 | } |
370 | 370 | ||
371 | def package_stagefile(file, d): | ||
372 | import bb, os | ||
373 | |||
374 | if bb.data.getVar('PSTAGING_ACTIVE', d, True) == "1": | ||
375 | destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) | ||
376 | bb.mkdirhier(os.path.dirname(destfile)) | ||
377 | #print "%s to %s" % (file, destfile) | ||
378 | bb.copyfile(file, destfile) | ||
379 | |||
380 | package_stagefile_shell() { | ||
381 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | ||
382 | srcfile=$1 | ||
383 | destfile=`echo $srcfile | sed s#${TMPDIR}#${PSTAGE_TMPDIR_STAGE}#` | ||
384 | destdir=`dirname $destfile` | ||
385 | mkdir -p $destdir | ||
386 | cp -dp $srcfile $destfile | ||
387 | fi | ||
388 | } | ||
389 | |||
371 | oe_machinstall() { | 390 | oe_machinstall() { |
372 | # Purpose: Install machine dependent files, if available | 391 | # Purpose: Install machine dependent files, if available |
373 | # If not available, check if there is a default | 392 | # If not available, check if there is a default |