summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-10-18 12:23:30 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-29 10:41:34 +0000
commit4ec1f8c0181b7f50214e64c39f0f69e991b49194 (patch)
tree9429591430cda0366082f28c143184051433cfca /scripts
parent8b42409dca729b7abbbdac04f533e161de86a3ef (diff)
downloadast2050-yocto-poky-4ec1f8c0181b7f50214e64c39f0f69e991b49194.zip
ast2050-yocto-poky-4ec1f8c0181b7f50214e64c39f0f69e991b49194.tar.gz
scripts/oe-pkgdata-util: check path arguments to ensure they exist
Show an error if the specified paths don't exist. (From OE-Core rev: eff2690f7976664e6257c1c19c89feea9152eb9e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-pkgdata-util12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index e34fcbe..01fccd2 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -37,6 +37,14 @@ def glob(args, usage):
pkglist_file = args[1]
globs = args[2].split()
+ if not os.path.exists(pkgdata_dir):
+ print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir)
+ sys.exit(1)
+
+ if not os.path.exists(pkglist_file):
+ print('ERROR: Unable to find package list file %s' % pkglist_file)
+ sys.exit(1)
+
skipregex = re.compile("-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-")
mappedpkgs = set()
@@ -148,6 +156,10 @@ def read_value(args, usage):
var = args[1]
packages = args[2].split()
+ if not os.path.exists(pkgdata_dir):
+ print('ERROR: Unable to find pkgdata directory %s' % pkgdata_dir)
+ sys.exit(1)
+
def readvar(pkgdata_file, var):
val = ""
with open(pkgdata_file, 'r') as f:
OpenPOWER on IntegriCloud