summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-06 11:12:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-14 08:40:36 +0000
commite13e53a30372a4cb3eabdb1b2199ff64c3e85cc3 (patch)
tree0fb295b69addb6beaa54245d2353d1e44bddd13b /scripts
parent04dc571ac7c26f0dcf1a1fcd466482e22519998d (diff)
downloadopenembedded-core-e13e53a30372a4cb3eabdb1b2199ff64c3e85cc3.tar.gz
openembedded-core-e13e53a30372a4cb3eabdb1b2199ff64c3e85cc3.tar.bz2
openembedded-core-e13e53a30372a4cb3eabdb1b2199ff64c3e85cc3.zip
oe-pkgdata-util: make find-path show a proper error if no package found
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-pkgdata-util5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index f70f85e147..2baa9f4c42 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -239,6 +239,7 @@ def lookup_recipe(args):
def find_path(args):
import json
+ found = False
for root, dirs, files in os.walk(os.path.join(args.pkgdata_dir, 'runtime')):
for fn in files:
with open(os.path.join(root,fn)) as f:
@@ -248,8 +249,12 @@ def find_path(args):
dictval = json.loads(val)
for fullpth in dictval.keys():
if fnmatch.fnmatchcase(fullpth, args.targetpath):
+ found = True
print("%s: %s" % (fn, fullpth))
break
+ if not found:
+ logger.error("Unable to find any package producing path %s" % args.targetpath)
+ sys.exit(1)
def main():