Various improvements for 'pmbootstrap export' (Fix #232) (#250)

* Various improvements for 'pmbootstrap export' (Fix #232)
* Do not try to generate the system image, but print a notice that
  it was not generated yet
* Display export path
* New default path: /tmp/postmarketOS-export (instead of current
  working dir)
* Create the export folder, if it does not exist yet
* Prettier output in the export message
* Adjust export message in install for consistency
This commit is contained in:
Oliver Smith 2017-07-27 17:40:38 +00:00 committed by GitHub
parent 2257bb6f2a
commit 6a034f1409
4 changed files with 13 additions and 8 deletions

View file

@ -98,11 +98,15 @@ def list_devices(args):
def export(args):
# Generate system image
# Create the export folder
if not os.path.exists(args.export_folder):
pmb.helpers.run.user(args, ["mkdir", "-p", args.export_folder])
# System image note
img_path = "/home/user/rootfs/" + args.device + ".img"
if not os.path.exists(args.work + "/chroot_native" + img_path):
setattr(args, "sdcard", None)
pmb.install.install(args, False)
logging.info("NOTE: To export the system image, run 'pmbootstrap"
" install' first (without the 'sdcard' parameter).")
# Rebuild the initramfs, just to make sure (see #69)
flavor = parse_flavor_arg(args)