summaryrefslogtreecommitdiffstats
path: root/scripts/oe-pkgdata-util
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/oe-pkgdata-util')
-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):
287def package_info(args): 287def package_info(args):
288 def parse_pkgdatafile(pkgdatafile): 288 def parse_pkgdatafile(pkgdatafile):
289 vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE'] 289 vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
290 if args.extra:
291 vars += args.extra
290 with open(pkgdatafile, 'r') as f: 292 with open(pkgdatafile, 'r') as f:
291 vals = dict() 293 vals = dict()
294 extra = ''
292 for line in f: 295 for line in f:
293 for var in vars: 296 for var in vars:
294 m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line) 297 m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
@@ -306,7 +309,12 @@ def package_info(args):
306 recipe_version = vals['PE'] + ":" + recipe_version 309 recipe_version = vals['PE'] + ":" + recipe_version
307 if 'PR' in vals: 310 if 'PR' in vals:
308 recipe_version = recipe_version + "-" + vals['PR'] 311 recipe_version = recipe_version + "-" + vals['PR']
309 print("%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size)) 312 if args.extra:
313 for var in args.extra:
314 if var in vals:
315 val = re.sub(r'\s+', ' ', vals[var])
316 extra += ' "%s"' % val
317 print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, recipe_version, pkg_size, extra))
310 318
311 # Handle both multiple arguments and multiple values within an arg (old syntax) 319 # Handle both multiple arguments and multiple values within an arg (old syntax)
312 packages = [] 320 packages = []