forked from Mirror/pmbootstrap
Small improvements: * Allow to specify multiple packages to `pmbootstrap parse_apkbuild` * Specifying no package will parse all packages (like kconfig_check) (also `parse_apkbuild`) * JSON output is sorted of `parse_apkbuild` * Make pkgver check optional, so we can disable it in the device wizard test case * Parse_apk* -> apk*_parse * Don't let the user mess with globs (disallow '*' in pkgname)
This commit is contained in:
parent
0bc60138f3
commit
0ae23afa60
5 changed files with 47 additions and 21 deletions
|
@ -244,13 +244,24 @@ def kconfig_check(args):
|
|||
raise RuntimeError("kconfig_check failed!")
|
||||
|
||||
|
||||
def parse_apkbuild(args):
|
||||
aport = pmb.build.other.find_aport(args, args.package)
|
||||
path = aport + "/APKBUILD"
|
||||
print(json.dumps(pmb.parse.apkbuild(args, path), indent=4))
|
||||
def apkbuild_parse(args):
|
||||
# Default to all packages
|
||||
packages = args.packages
|
||||
if not packages:
|
||||
for apkbuild in glob.glob(args.aports + "/*/*/APKBUILD"):
|
||||
packages.append(os.path.basename(os.path.dirname(apkbuild)))
|
||||
|
||||
# Iterate over all packages
|
||||
packages.sort()
|
||||
for package in packages:
|
||||
print(package + ":")
|
||||
aport = pmb.build.other.find_aport(args, package)
|
||||
path = aport + "/APKBUILD"
|
||||
print(json.dumps(pmb.parse.apkbuild(args, path), indent=4,
|
||||
sort_keys=True))
|
||||
|
||||
|
||||
def parse_apkindex(args):
|
||||
def apkindex_parse(args):
|
||||
result = pmb.parse.apkindex.parse(args, args.apkindex_path)
|
||||
if args.package:
|
||||
if args.package not in result:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue