diff --git a/pmb/flasher/export.py b/pmb/flasher/export.py index 950070bf..d57945d8 100644 --- a/pmb/flasher/export.py +++ b/pmb/flasher/export.py @@ -30,6 +30,8 @@ def export(args, flavor, folder): """ Create convenience symlinks to the system image and boot files. """ + logging.info("Export symlinks to: " + folder) + # File descriptions info = { "boot.img-" + flavor: "Fastboot compatible boot.img file," @@ -58,7 +60,7 @@ def export(args, flavor, folder): link = folder + "/" + basename # Display a readable message - msg = "Symlink: " + basename + msg = " * " + basename if basename in info: msg += " (" + info[basename] + ")" logging.info(msg) diff --git a/pmb/flasher/frontend.py b/pmb/flasher/frontend.py index 604428fa..f50e623c 100644 --- a/pmb/flasher/frontend.py +++ b/pmb/flasher/frontend.py @@ -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) diff --git a/pmb/install/install.py b/pmb/install/install.py index 58abdd14..dbb2e9bd 100644 --- a/pmb/install/install.py +++ b/pmb/install/install.py @@ -153,4 +153,4 @@ def install(args): # Export information logging.info("* If the above steps do not work, you can also create" " symlinks to the generated files with 'pmbootstrap flasher" - " export ' and flash outside of pmbootstrap.") + " export [export_folder]' and flash outside of pmbootstrap.") diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index 6df247b7..9a083e3e 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with pmbootstrap. If not, see . """ import argparse -import os import pmb.config import pmb.parse.arch @@ -45,8 +44,8 @@ def arguments_flasher(subparser): # Export: additional arguments export.add_argument("export_folder", help="export folder, defaults to" - " the current working directory.", - default=os.getcwd(), nargs="?") + " /tmp/postmarketOS-export", + default="/tmp/postmarketOS-export", nargs="?") return ret