Allow 'pmbootstrap menuconfig' without specifying "linux-" (#295)

We can allow both ways:
* pmbootstrap menuconfig linux-motorola-titan
* pmbootstrap menuconfig motorola-titan

The former will show a tip about the second
This also prevents users from running menuconfig on aports like
'device-motorola-titan' or 'mkbootimg'
This commit is contained in:
Pablo Castellano 2017-07-30 20:41:49 +02:00 committed by Oliver Smith
parent 26c8a94d4d
commit 915da12dd1
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,13 @@ import pmb.parse
def menuconfig(args, pkgname, arch):
if pkgname.startswith("linux-"):
pkgname_ = pkgname.split("linux-")[1]
logging.info("PROTIP: You can simply do 'pmbootstrap menuconfig " +
pkgname_ + "'")
else:
pkgname = "linux-" + pkgname
# Read apkbuild
aport = pmb.build.find_aport(args, pkgname, False)
if not aport: