menuconfig: add gconfig/xconfig support (#1509)

* change "pmbootstrap kconfig_check" to "pmbootstrap kconfig check"
* change "pmbootstrap menuconfig" to "pmbootstrap kconfig edit [-x|-g]"
  (with legacy alias, because the first syntax was referenced to a lot)
* enable X11 interfaces: -x: xconfig, -g: gconfig
* new function to copy the xauthority file:
  pmb.chroot.other.copy_xauthority()
* remove menufconfig() function from the kernel template and all kernel
  aports ([skip ci] because it would rebuild all kernels and run out of
  time). Alpine has dropped this as well, and it wouldn't work with the
  new code anyway.
This commit is contained in:
steamport 2018-06-09 02:52:24 -04:00 committed by Oliver Smith
parent 98d7376800
commit 30df0725ca
95 changed files with 138 additions and 611 deletions

View file

@ -188,6 +188,9 @@ def export(args):
def menuconfig(args):
logging.warning("WARNING: 'pmbootstrap menuconfig' is deprecated and will"
" soon be removed. Please use 'pmbootstrap kconfig edit'"
" instead.")
pmb.build.menuconfig(args, args.package)
@ -233,23 +236,30 @@ def newapkbuild(args):
pmb.build.newapkbuild(args, args.folder, pass_through, args.force)
def kconfig_check(args):
# Default to all kernel packages
packages = args.packages
if not packages:
for aport in glob.glob(args.aports + "/*/linux-*"):
packages.append(os.path.basename(aport).split("linux-")[1])
def kconfig(args):
if args.action_kconfig == "check":
# Default to all kernel packages
packages = []
if args.package == "" or args.package is None:
for aport in glob.glob(args.aports + "/*/linux-*"):
packages.append(os.path.basename(aport).split("linux-")[1])
else:
packages = [args.package]
# Iterate over all kernels
error = False
packages.sort()
for package in packages:
if not pmb.parse.kconfig.check(args, package, details=True):
error = True
# Iterate over all kernels
error = False
packages.sort()
for package in packages:
if not pmb.parse.kconfig.check(args, package, details=True):
error = True
# At least one failure
if error:
raise RuntimeError("kconfig_check failed!")
# At least one failure
if error:
raise RuntimeError("kconfig check failed!")
else:
logging.info("kconfig check succeded!")
elif args.action_kconfig == "edit":
pmb.build.menuconfig(args, args.package)
def apkbuild_parse(args):