diff options
author | Yeoh Ee Peng <ee.peng.yeoh@intel.com> | 2019-11-01 14:43:47 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-04 13:39:05 +0000 |
commit | 7035b4b21e02786932a512ae2f954bed441f8adf (patch) | |
tree | 5515f6b3c70008074810bc76ae3d2ce3def97355 /scripts | |
parent | 03a790db5582b73fa8e5b2de7a83b9d1422832e4 (diff) | |
download | poky-7035b4b21e02786932a512ae2f954bed441f8adf.tar.gz |
scripts/oe-pkgdata-util: Enable list-pkgs to print ordered packages
The list-pkgs currently print packages in unordered format.
Enable list-pkgs to print ordered packages that will ease
viewing.
(From OE-Core rev: ab661f96e2fd529588692c978274a840f34ee7cf)
Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
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 | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 9cc78d1104..93220e3617 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util | |||
@@ -389,21 +389,16 @@ def list_pkgs(args): | |||
389 | return False | 389 | return False |
390 | return True | 390 | return True |
391 | 391 | ||
392 | pkglist = [] | ||
392 | if args.recipe: | 393 | if args.recipe: |
393 | packages = get_recipe_pkgs(args.pkgdata_dir, args.recipe, args.unpackaged) | 394 | packages = get_recipe_pkgs(args.pkgdata_dir, args.recipe, args.unpackaged) |
394 | 395 | ||
395 | if args.runtime: | 396 | if args.runtime: |
396 | pkglist = [] | ||
397 | runtime_pkgs = lookup_pkglist(packages, args.pkgdata_dir, False) | 397 | runtime_pkgs = lookup_pkglist(packages, args.pkgdata_dir, False) |
398 | for rtpkgs in runtime_pkgs.values(): | 398 | for rtpkgs in runtime_pkgs.values(): |
399 | pkglist.extend(rtpkgs) | 399 | pkglist.extend(rtpkgs) |
400 | else: | 400 | else: |
401 | pkglist = packages | 401 | pkglist = packages |
402 | |||
403 | for pkg in pkglist: | ||
404 | if matchpkg(pkg): | ||
405 | found = True | ||
406 | print("%s" % pkg) | ||
407 | else: | 402 | else: |
408 | if args.runtime: | 403 | if args.runtime: |
409 | searchdir = 'runtime-reverse' | 404 | searchdir = 'runtime-reverse' |
@@ -414,9 +409,13 @@ def list_pkgs(args): | |||
414 | for fn in files: | 409 | for fn in files: |
415 | if fn.endswith('.packaged'): | 410 | if fn.endswith('.packaged'): |
416 | continue | 411 | continue |
417 | if matchpkg(fn): | 412 | pkglist.append(fn) |
418 | found = True | 413 | |
419 | print("%s" % fn) | 414 | for pkg in sorted(pkglist): |
415 | if matchpkg(pkg): | ||
416 | found = True | ||
417 | print("%s" % pkg) | ||
418 | |||
420 | if not found: | 419 | if not found: |
421 | if args.pkgspec: | 420 | if args.pkgspec: |
422 | logger.error("Unable to find any package matching %s" % args.pkgspec) | 421 | logger.error("Unable to find any package matching %s" % args.pkgspec) |