summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-11-11 23:34:40 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 07:50:30 +0000
commite67c5b0ccf65eba3fb1c4fb177931baa24d1767a (patch)
tree80b8533afde08a7b3349cf4440bf846a116a2b38
parent4e2c5e171c577f99541dabeb1356355f3cc707f2 (diff)
downloadpoky-e67c5b0ccf65eba3fb1c4fb177931baa24d1767a.tar.gz
bitbake-prserv-tool: check file name
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. (From OE-Core rev: 273eee7a3614caea17c5bc93b720353641293cf7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 ()
86 86
87[ $# -eq 0 ] && help && exit 1 87[ $# -eq 0 ] && help && exit 1
88 88
89case $2 in
90*.conf|*.inc)
91 ;;
92*)
93 echo ERROR: $2 must end with .conf or .inc!
94 exit 1
95 ;;
96esac
97
89case $1 in 98case $1 in
90export) 99export)
91 do_export $2 100 do_export $2