diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-03-14 16:28:12 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-03-14 16:28:12 +0000 |
commit | 53d4e93052b2cbefe1e2175f1183f8821f3109f5 (patch) | |
tree | 6c7102182af6ad8c05fa1623fc6962bf080993f2 | |
parent | e3e0ec29e303e833aef71d1653d6743257433182 (diff) |
base.bbclass, package.bbclass: Move package_stagefile function to base.bbclass and add shell version
-rw-r--r-- | classes/base.bbclass | 19 | ||||
-rw-r--r-- | classes/package.bbclass | 12 |
2 files changed, 19 insertions, 12 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index cfdcaf9c3e..c2ce508538 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -368,6 +368,25 @@ oe_libinstall() { __runcmd cd "$olddir" } +def package_stagefile(file, d): + import bb, os + + if bb.data.getVar('PSTAGING_ACTIVE', d, True) == "1": + destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) + bb.mkdirhier(os.path.dirname(destfile)) + #print "%s to %s" % (file, destfile) + bb.copyfile(file, destfile) + +package_stagefile_shell() { + if [ "$PSTAGING_ACTIVE" = "1" ]; then + srcfile=$1 + destfile=`echo $srcfile | sed s#${TMPDIR}#${PSTAGE_TMPDIR_STAGE}#` + destdir=`dirname $destfile` + mkdir -p $destdir + cp -dp $srcfile $destfile + fi +} + oe_machinstall() { # Purpose: Install machine dependent files, if available # If not available, check if there is a default diff --git a/classes/package.bbclass b/classes/package.bbclass index f9d9193c32..9fc4df0b98 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -459,18 +459,6 @@ python populate_packages () { } populate_packages[dirs] = "${D}" -def package_stagefile(file, d): - import bb, os - - pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) - - if pstageactive == "1": - destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)) - bb.mkdirhier(os.path.dirname(destfile)) - #print "%s to %s" % (file, destfile) - bb.copyfile(file, destfile) - - python emit_pkgdata() { from glob import glob |