aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-10-20 01:57:49 -0700
committerRobert Yang <liezhi.yang@windriver.com>2015-11-11 23:30:37 -0800
commit54aaee8a73f43e01c9b2ed7a1652e96a392e00d6 (patch)
tree80143258ccca29fde7a8055d12620dd94c475605
parent70acbfcac541d52baad29e7fd76796e3d3f6a964 (diff)
downloadopenembedded-core-contrib-oe_contrib/rbt/prserv.tar.gz
openembedded-core-contrib-oe_contrib/rbt/prserv.tar.bz2
openembedded-core-contrib-oe_contrib/rbt/prserv.zip
bitbake-prserv-tool: check file nameoe_contrib/rbt/prserv
Fixed: $ bitbake-prserv-tool import /tmp/1 File "/path/to/lib/bb/parse/__init__.py", line 114, in handle(fn='/tmp/1', data=<bb.data_smart.DataSmart object at 0x2369bd0>, include=True): return h['handle'](fn, data, include) > raise ParseError("not a BitBake file", fn) ParseError: ParseError in /tmp/1: not a BitBake file But 1.conf or 1.inc works well, check the filename and print proper error message. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rwxr-xr-xscripts/bitbake-prserv-tool9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
index 28c2416bfe..fa31b52584 100755
--- a/scripts/bitbake-prserv-tool
+++ b/scripts/bitbake-prserv-tool
@@ -86,6 +86,15 @@ do_migrate_localcount ()
[ $# -eq 0 ] && help && exit 1
+case $2 in
+*.conf|*.inc)
+ ;;
+*)
+ echo ERROR: $2 must end with .conf or .inc!
+ exit 1
+ ;;
+esac
+
case $1 in
export)
do_export $2