aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-01 09:56:20 -0700
committerChris Larson <chris_larson@mentor.com>2010-10-01 10:00:32 -0700
commit5e4f37694f376c44f2a92b2e8468a485af157310 (patch)
tree3ddfb125d059d090b763344f58a0b13b3df6461d /classes
parent7787ce2f043c98ae94f7c3f3f395fbed475212ba (diff)
downloadopenembedded-5e4f37694f376c44f2a92b2e8468a485af157310.tar.gz
utils.bbclass: add wrapper script generator
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/utils.bbclass23
1 files changed, 21 insertions, 2 deletions
diff --git a/classes/utils.bbclass b/classes/utils.bbclass
index 1c636beef6..9a9c7b5ab7 100644
--- a/classes/utils.bbclass
+++ b/classes/utils.bbclass
@@ -177,7 +177,7 @@ def base_chk_file_checksum(localpath, src_uri, expected_md5sum, expected_sha256s
return True
def base_get_checksums(pn, pv, src_uri, localpath, params, data):
- # Try checksum from recipe and then parse checksums.ini
+ # Try checksum from recipe and then parse checksums.ini
# and try PN-PV-SRC_URI first and then try PN-SRC_URI
# we rely on the get method to create errors
try:
@@ -228,7 +228,7 @@ def base_get_checksums(pn, pv, src_uri, localpath, params, data):
expected_sha256sum = parser.get(src_uri, "sha256")
else:
return (None,None)
-
+
if name:
bb.note("This package has no checksums in corresponding recipe '%s', please consider moving its checksums from checksums.ini file \
\nSRC_URI[%s.md5sum] = \"%s\"\nSRC_URI[%s.sha256sum] = \"%s\"\n" % (bb.data.getVar("FILE", data, True), name, expected_md5sum, name, expected_sha256sum))
@@ -449,6 +449,25 @@ oe_machinstall() {
fi
}
+create_wrapper () {
+ # Create a wrapper script
+ #
+ # These are useful to work around relocation issues, by setting environment
+ # variables which point to paths in the filesystem.
+ #
+ # Usage: create_wrapper FILENAME [[VAR=VALUE]..]
+
+ cmd=$1
+ shift
+ mv $cmd $cmd.real
+ cmdname=`basename $cmd`.real
+ cat <<END >$cmd
+#!/bin/sh
+exec env $@ \`dirname \$0\`/$cmdname
+END
+ chmod +x $cmd
+}
+
def check_app_exists(app, d):
from bb import which, data