Skip to content
Snippets Groups Projects
Commit abc10aff authored by Grant Miller's avatar Grant Miller
Browse files

Add package completion proof of concept (very bad)

parent 2c39e1c0
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,14 @@ import pmb.config
import pmb.helpers.run
def getpackagelist(aportsdir):
packages=set()
for dir in os.listdir(aportsdir):
for package in os.listdir('aports/'+dir):
packages.add(package)
return packages
def folder_size(args, path):
"""
Run `du` to calculate the size of a folder (this is less code and
......
......@@ -430,7 +430,7 @@ def arguments():
" is incompatible with how Alpine's abuild handles it.",
dest="ignore_depends")
for action in [checksum, build, aportgen]:
action.add_argument("packages", nargs="+")
action.add_argument("packages", nargs="+", metavar="PACKAGES", choices=pmb.helpers.other.getpackagelist("aports"))
# Action: kconfig_check / apkbuild_parse
kconfig_check = sub.add_parser("kconfig_check", help="check, whether all"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment