pmb.helpers.pmaports: glob just once (!1898)

This commit is contained in:
Minecrell 2020-03-30 09:52:47 +02:00 committed by Oliver Smith
parent 9d17ed29e3
commit cd630edf25
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 37 additions and 47 deletions

View file

@ -247,11 +247,12 @@ def kconfig(args):
# Default to all kernel packages
packages = []
if args.package == "" or args.package is None:
for aport in pmb.helpers.pmaports.get_list(args, "linux-*"):
packages.append(aport.split("linux-")[1])
else:
if args.package:
packages = [args.package]
else:
for aport in pmb.helpers.pmaports.get_list(args):
if aport.startswith("linux-"):
packages.append(aport.split("linux-")[1])
# Iterate over all kernels
error = False