From patchwork Fri Jun 17 18:37:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Tunnicliffe X-Patchwork-Id: 2037 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 279BB23E4F for ; Fri, 17 Jun 2011 18:37:40 +0000 (UTC) Received: from mail-vw0-f52.google.com (mail-vw0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id CF7BAA184DB for ; Fri, 17 Jun 2011 18:37:39 +0000 (UTC) Received: by vws16 with SMTP id 16so1811665vws.11 for ; Fri, 17 Jun 2011 11:37:39 -0700 (PDT) Received: by 10.52.75.4 with SMTP id y4mr3501479vdv.167.1308335859257; Fri, 17 Jun 2011 11:37:39 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs266725vdc; Fri, 17 Jun 2011 11:37:39 -0700 (PDT) Received: by 10.227.195.209 with SMTP id ed17mr389876wbb.13.1308335858366; Fri, 17 Jun 2011 11:37:38 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id gb14si2070144wbb.137.2011.06.17.11.37.37; Fri, 17 Jun 2011 11:37:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QXdvF-0008Hw-ID for ; Fri, 17 Jun 2011 18:37:37 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 81BE82E84FB for ; Fri, 17 Jun 2011 18:37:37 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 357 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 357: Add option --nocheck-mmc to linaro-media-create Message-Id: <20110617183737.27855.53952.launchpad@loganberry.canonical.com> Date: Fri, 17 Jun 2011 18:37:37 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13242"; Instance="initZopeless config overlay" X-Launchpad-Hash: d2aa01abad5e15be6cc43795cc1491a4624035a3 Merge authors: James Tunnicliffe (dooferlad) Related merge proposals: https://code.launchpad.net/~dooferlad/linaro-image-tools/add_yes_to_write_to_mmc_option/+merge/64955 proposed by: James Tunnicliffe (dooferlad) ------------------------------------------------------------ revno: 357 [merge] committer: James Tunnicliffe branch nick: linaro-image-tools timestamp: Fri 2011-06-17 18:56:04 +0100 message: Add option --nocheck-mmc to linaro-media-create modified: linaro-media-create linaro_image_tools/media_create/__init__.py linaro_image_tools/media_create/check_device.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro-media-create' --- linaro-media-create 2011-05-19 14:30:21 +0000 +++ linaro-media-create 2011-06-17 12:47:16 +0000 @@ -123,7 +123,8 @@ print "The board '%s' does not support the --mmc option. Please use " \ "--image_file to create an image file for this board." % args.board sys.exit(1) - if not confirm_device_selection_and_ensure_it_is_ready(args.device): + if not confirm_device_selection_and_ensure_it_is_ready(args.device, + args.nocheck_mmc): sys.exit(1) elif not args.should_format_rootfs or not args.should_format_bootfs: print ("Do not use --no-boot or --no-part in conjunction with " === modified file 'linaro_image_tools/media_create/__init__.py' --- linaro_image_tools/media_create/__init__.py 2011-05-26 09:16:35 +0000 +++ linaro_image_tools/media_create/__init__.py 2011-06-17 12:47:16 +0000 @@ -119,6 +119,11 @@ '--align-boot-part', dest='should_align_boot_part', action='store_true', help='Align boot partition too (might break older x-loaders).') + parser.add_argument( + '--nocheck-mmc', dest='nocheck_mmc', + action='store_true', + help='Assume yes to the question "Are you 100%% sure, on selecting [mmc]"') + return parser def get_android_args_parser(): === modified file 'linaro_image_tools/media_create/check_device.py' --- linaro_image_tools/media_create/check_device.py 2011-04-28 11:08:45 +0000 +++ linaro_image_tools/media_create/check_device.py 2011-06-17 17:54:19 +0000 @@ -110,7 +110,9 @@ partitions.ensure_partition_is_not_mounted(part) -def confirm_device_selection_and_ensure_it_is_ready(device): +def confirm_device_selection_and_ensure_it_is_ready( + device, + yes_to_mmc_selection = False): """Confirm this is the device to use and ensure it's ready. If the device exists, the user is asked to confirm that this is the @@ -123,7 +125,7 @@ if _does_device_exist(device): print '\nI see...' _print_devices() - if _select_device(device): + if yes_to_mmc_selection or _select_device(device): _ensure_device_partitions_not_mounted(device) return True else: