forked from Mirror/pmbootstrap
* add my own build key * enable the repo in the config * update the README file * Adjust testcase, that validates the keys and enable it in testcases_fast.sh * Only save/load keys to/from the config file, which we ask for during 'pmbootstrap init', so the binary repo gets used even if a config file already exists (this also removes a workaround, that deletes the work folder path from the config dictionary before writing it) * Download missing APKINDEX.tar.gz files with Python code, before attempting to build packages (so we know which ones aleady exist in the binary packages repository) * Consider APKINDEX files older than 4 hours as outdated and download them again (also in Python code) * Provide 'pmbootstrap update' to force-update the APKINDEX files * Travis: more logging output on failure * Only allow keys from config_keys to be used by "pmbootstrap config"
This commit is contained in:
parent
94e2387af5
commit
a7b881e4cc
18 changed files with 352 additions and 41 deletions
|
@ -35,6 +35,7 @@ import pmb.chroot.other
|
|||
import pmb.flasher
|
||||
import pmb.helpers.logging
|
||||
import pmb.helpers.other
|
||||
import pmb.helpers.repo
|
||||
import pmb.helpers.run
|
||||
import pmb.install
|
||||
import pmb.parse
|
||||
|
@ -114,16 +115,15 @@ def chroot(args):
|
|||
|
||||
|
||||
def config(args):
|
||||
pmb.helpers.logging.disable()
|
||||
if args.name and args.name not in pmb.config.defaults:
|
||||
valid_keys = ", ".join(sorted(pmb.config.defaults.keys()))
|
||||
print("The variable name you have specified is invalid.")
|
||||
print("The following are supported: " + valid_keys)
|
||||
sys.exit(1)
|
||||
keys = pmb.config.config_keys
|
||||
if args.name and args.name not in keys:
|
||||
logging.info("NOTE: Valid config keys: " + ", ".join(keys))
|
||||
raise RuntimeError("Invalid config key: " + args.name)
|
||||
|
||||
cfg = pmb.config.load(args)
|
||||
if args.value:
|
||||
cfg["pmbootstrap"][args.name] = args.value
|
||||
logging.info("Config changed: " + args.name + "='" + args.value + "'")
|
||||
pmb.config.save(args, cfg)
|
||||
elif args.name:
|
||||
value = cfg["pmbootstrap"].get(args.name, "")
|
||||
|
@ -131,6 +131,9 @@ def config(args):
|
|||
else:
|
||||
cfg.write(sys.stdout)
|
||||
|
||||
# Don't write the "Done" message
|
||||
pmb.helpers.logging.disable()
|
||||
|
||||
|
||||
def index(args):
|
||||
pmb.build.index_repo(args, args.arch_native)
|
||||
|
@ -157,6 +160,10 @@ def menuconfig(args):
|
|||
pmb.build.menuconfig(args, args.package)
|
||||
|
||||
|
||||
def update(args):
|
||||
pmb.helpers.repo.update(args, True)
|
||||
|
||||
|
||||
def kconfig_check(args):
|
||||
# Default to all kernel packages
|
||||
packages = args.packages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue