Low hanging fruit basket (Close #220, Close #239) (#253)

* postmarketos-splash: change arch from "all" to "noarch"
* lg-mako: use .tar.gz instead of .zip (because that's the reference
  APKBUILD)
* #220: Allow specifying multiple packages for checksum, build,
  aportgen
* #239: Add chroot shortcuts (--rootfs and --buildroot)
* Show chroot and command before entering chroot
This commit is contained in:
Oliver Smith 2017-07-26 18:59:11 +00:00 committed by GitHub
parent 81d8acd536
commit 2cabe1d51a
4 changed files with 48 additions and 18 deletions

View file

@ -145,14 +145,22 @@ def arguments():
stats = sub.add_parser("stats", help="show ccache stats")
stats.add_argument("--arch")
# Action: chroot / build_init / kernel
# Action: build_init / chroot
build_init = sub.add_parser("build_init", help="initialize build"
" environment (usually you do not need to call this)")
chroot = sub.add_parser("chroot", help="start shell in chroot")
chroot.add_argument("command", default=["sh"], help="command"
" to execute inside the chroot. default: sh", nargs='*')
for action in [build_init, chroot]:
action.add_argument("--suffix", default="native")
suffix = action.add_mutually_exclusive_group()
suffix.add_argument("--rootfs", action="store_true",
help="Chroot for the device root file system")
suffix.add_argument("--buildroot", action="store_true",
help="Chroot for building packages for the device "
"architecture")
suffix.add_argument("--suffix", default=None,
help="Specify any chroot suffix, defaults to"
" 'native'")
# Action: install
install = sub.add_parser("install", help="set up device specific" +
@ -166,11 +174,15 @@ def arguments():
install.add_argument("--no-fde", help="do not use full disk encryption",
action="store_false", dest="full_disk_encryption")
# Action: build / checksum / menuconfig / parse_apkbuild / aportgen
# Action: menuconfig / parse_apkbuild
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"
" a kernel aport")
checksum = sub.add_parser("checksum", help="update aport checksums")
parse_apkbuild = sub.add_parser("parse_apkbuild")
for action in [menuconfig, parse_apkbuild]:
action.add_argument("package")
# Action: build / checksum / aportgen
checksum = sub.add_parser("checksum", help="update aport checksums")
aportgen = sub.add_parser("aportgen", help="generate a package build recipe"
" (aport/APKBUILD) based on an upstream aport from Alpine")
build = sub.add_parser("build", help="create a package for a"
@ -178,8 +190,8 @@ def arguments():
build.add_argument("--arch")
build.add_argument("--force", action="store_true")
build.add_argument("--buildinfo", action="store_true")
for action in [checksum, build, menuconfig, parse_apkbuild, aportgen]:
action.add_argument("package")
for action in [checksum, build, aportgen]:
action.add_argument("packages", nargs="+")
# Action: challenge
challenge = sub.add_parser("challenge",