oe-pkgdata-util: package-info: Allow extra variables to be displayed
PATCH v2 1/1 oe-pkgdata-util: package-info: Allow extra variables to be displayed
By specifying the -e <var> option one or multiple times, extra variables available in the pkgdata can be displayed, e.,g, oe-pkgdata-util package-info -e SUMMARY -e LICENSE .... The extra variables displayed are quoted since some of them may contain whitespace.
---
PATCHv2: Changed references to SRC_URI into LICENSE, since SRC_URI is not an available variable in the pkgdata.
scripts/oe-pkgdata-util | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
scripts/oe-pkgdata-util +9 -2
@@ -325,8 +325,14 @@ def package_info(args): recipe_version = recipe_version + "-" + mappings[pkg]['PR'] pkg_size = mappings[pkg]['PKGSIZE'] - items.append("%s %s %s %s %s" % - (pkg, pkg_version, recipe, recipe_version, pkg_size)) + line = "%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size) + + for val in args.extra: + src_uri = mappings[pkg][val].strip() + src_uri = re.sub(r'\s+', ' ', src_uri) + line += ' "%s"' % src_uri + + items.append(line) print('\n'.join(items)) def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):
@@ -530,6 +536,7 @@ def main(): description='Looks up the specified runtime package(s) and display information') parser_package_info.add_argument('pkg', nargs='*', help='Runtime package name to look up') parser_package_info.add_argument('-f', '--file', help='Read package names from the specified file (one per line, first field only)') + parser_package_info.add_argument('-e', '--extra', help='Extra variables to display, e.g., LICENSE (can be specified multiple times)', action='append') parser_package_info.set_defaults(func=package_info) parser_find_path = subparsers.add_parser('find-path',
Signature · 1 line
2.12.0
*ping*
//Peter
Quoted 69 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Kjellerstedt
Sent: den 1 juni 2017 09:34
To: [email protected]
Subject: [OE-core] [PATCHv2] oe-pkgdata-util: package-info: Allow extra variables to be displayedBy specifying the -e <var> option one or multiple times, extra variables available in the pkgdata can be displayed, e.,g,
oe-pkgdata-util package-info -e SUMMARY -e LICENSE .... The extra variables displayed are quoted since some of them may contain whitespace.Signed-off-by Peter Kjellerstedt <[email protected]>---
PATCHv2: Changed references toSRC_URIinto LICENSE, sinceSRC_URIis not an available variable in the pkgdata.scripts/oe-pkgdata-util | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)scripts/oe-pkgdata-util +0
-0@@ -325,8 +325,14 @@ def package_info(args): recipe_version = recipe_version + "-" +mappings[pkg]['PR']
pkg_size= mappings[pkg]['PKGSIZE']scripts/oe-pkgdata-util +0
-2- items.append("%s %s %s %s %s" % - (pkg, pkg_version, recipe, recipe_version,
pkg_size))
+ line = "%s %s %s %s %s" % (pkg,pkg_version, recipe,recipe_version,pkg_size)scripts/oe-pkgdata-util +7
-0+ + for val in args.extra: + src_uri = mappings[pkg][val].strip() + src_uri = re.sub(r'\s+', ' ', src_uri) + line += ' "%s"' % src_uri + + items.append(line) print('\n'.join(items)) def get_recipe_pkgs(pkgdata_dir, recipe, unpackaged):@@ -530,6 +536,7 @@ def main(): description='Looks up the specified runtime package(s) and display information') parser_package_info.add_argument('pkg', nargs='*', help='Runtime package name to look up') parser_package_info.add_argument('-f', '--file', help='Readpackage names from the specified file (one per line, first field only)')
+ parser_package_info.add_argument('-e', '--extra', help='Extra
variables to display, e.g., LICENSE (can be specified multiple times)', action='append')
parser_package_info.set_defaults(func=package_info)
parser_find_path= subparsers.add_parser('find-path',
--
2.12.0--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core