diff options
author | Ross Burton <ross.burton@intel.com> | 2018-08-31 13:11:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-05 17:48:23 +0100 |
commit | 8439565a009bb72d63bb3be6230832811b04cf6e (patch) | |
tree | 2eab0b0c2c773af5a7de3b2c0e1a64472f709b3a /scripts | |
parent | f863713ae255bf5b6619c98ecd36aacbda352bbb (diff) | |
download | openembedded-core-8439565a009bb72d63bb3be6230832811b04cf6e.tar.gz openembedded-core-8439565a009bb72d63bb3be6230832811b04cf6e.tar.bz2 openembedded-core-8439565a009bb72d63bb3be6230832811b04cf6e.zip |
oe-pkgdata-util: add option for lookup-recipe to not fatally fail
It is often useful to run lookup-recipe on a list of packages and get
notifications that there were failures, instead of a fatal error on the first
failure.
This makes it possible to pass long lists of packages to oe-pkgdata-util and
process the output.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-pkgdata-util | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index e6c9df94e8..53739b0bfc 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -279,10 +279,14 @@ def lookup_recipe(args): parse_pkgdatafile(pkgdatafile) continue pkgdatafile = os.path.join(args.pkgdata_dir, 'runtime-reverse', pkg) - if not os.path.exists(pkgdatafile): - logger.error("The following packages could not be found: %s" % pkg) - sys.exit(1) - parse_pkgdatafile(pkgdatafile) + if os.path.exists(pkgdatafile): + parse_pkgdatafile(pkgdatafile) + else: + if args.carryon: + print("The following packages could not be found: %s" % pkg) + else: + logger.error("The following packages could not be found: %s" % pkg) + sys.exit(1) def package_info(args): def parse_pkgdatafile(pkgdatafile): @@ -558,6 +562,7 @@ def main(): help='Find recipe producing one or more packages', description='Looks up the specified runtime package(s) to see which recipe they were produced by') parser_lookup_recipe.add_argument('pkg', nargs='+', help='Runtime package name to look up') + parser_lookup_recipe.add_argument('-c', '--continue', dest="carryon", help='Continue looking up recipes even if we can not find one', action='store_true') parser_lookup_recipe.set_defaults(func=lookup_recipe) parser_package_info = subparsers.add_parser('package-info', |