summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2018-06-02 21:30:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:14:43 +0100
commitcd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c (patch)
treef0e812a04259561653ea4632cc095eb2ace871b7 /scripts
parent38f8284212370999e1e7b0f6559f7cd786e80d1a (diff)
downloadopenembedded-core-contrib-cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c.tar.gz
oe-pkgdata-util: package-info: Re-add support for the --extra option
Commit 64d3ce83 broke the --extra option. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-pkgdata-util10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index a4e84138d7..e6c9df94e8 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -287,8 +287,11 @@ def lookup_recipe(args):
def package_info(args):
def parse_pkgdatafile(pkgdatafile):
vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
+ if args.extra:
+ vars += args.extra
with open(pkgdatafile, 'r') as f:
vals = dict()
+ extra = ''
for line in f:
for var in vars:
m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
@@ -306,7 +309,12 @@ def package_info(args):
recipe_version = vals['PE'] + ":" + recipe_version
if 'PR' in vals:
recipe_version = recipe_version + "-" + vals['PR']
- print("%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size))
+ if args.extra:
+ for var in args.extra:
+ if var in vals:
+ val = re.sub(r'\s+', ' ', vals[var])
+ extra += ' "%s"' % val
+ print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, recipe_version, pkg_size, extra))
# Handle both multiple arguments and multiple values within an arg (old syntax)
packages = []