From patchwork Mon Nov 21 13:51:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 5233 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 3B60723E07 for ; Mon, 21 Nov 2011 13:51:17 +0000 (UTC) Received: from mail-dy0-f52.google.com (mail-dy0-f52.google.com [209.85.220.52]) by fiordland.canonical.com (Postfix) with ESMTP id 26096A18698 for ; Mon, 21 Nov 2011 13:51:17 +0000 (UTC) Received: by dyf4 with SMTP id 4so488313dyf.11 for ; Mon, 21 Nov 2011 05:51:17 -0800 (PST) Received: by 10.152.111.170 with SMTP id ij10mr5834505lab.5.1321883476638; Mon, 21 Nov 2011 05:51:16 -0800 (PST) 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.152.41.198 with SMTP id h6cs117966lal; Mon, 21 Nov 2011 05:51:15 -0800 (PST) Received: by 10.216.135.212 with SMTP id u62mr2096704wei.89.1321883473269; Mon, 21 Nov 2011 05:51:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id w52si4664371wec.46.2011.11.21.05.51.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Nov 2011 05:51:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RSUHA-0005M6-KJ for ; Mon, 21 Nov 2011 13:51:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8EF47E00F2 for ; Mon, 21 Nov 2011 13:51:12 +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: 464 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 464: In l-m-c, stop before trying to install hwpacks if we detect that we can't execute anything in th... Message-Id: <20111121135112.14050.98499.launchpad@ackee.canonical.com> Date: Mon, 21 Nov 2011 13:51:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14299"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: fd39826e472561e75c8faa35ca2f0e32ec9f8a39 Merge authors: Guilherme Salgado (salgado) Related merge proposals: https://code.launchpad.net/~salgado/linaro-image-tools/bug-814671/+merge/82454 proposed by: Guilherme Salgado (salgado) review: Approve - Mattias Backman (mabac) ------------------------------------------------------------ revno: 464 [merge] committer: Guilherme Salgado branch nick: trunk timestamp: Mon 2011-11-21 10:49:14 -0300 message: In l-m-c, stop before trying to install hwpacks if we detect that we can't execute anything in the chroot modified: linaro_image_tools/media_create/chroot_utils.py linaro_image_tools/media_create/tests/test_media_create.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_image_tools/media_create/chroot_utils.py' --- linaro_image_tools/media_create/chroot_utils.py 2011-07-25 16:48:37 +0000 +++ linaro_image_tools/media_create/chroot_utils.py 2011-11-16 21:09:18 +0000 @@ -57,6 +57,21 @@ try: mount_chroot_proc(chroot_dir) + try: + # Sometimes the host will have qemu-user-static installed but + # another package (i.e. scratchbox) will have mangled its config + # and thus we won't be able to chroot and install the hwpack, so + # we fail here and tell the user to ensure qemu-arm-static is + # setup before trying again. + cmd_runner.run(['true'], as_root=True, chroot=chroot_dir).wait() + except: + print ("Cannot proceed with hwpack installation because " + "there doesn't seem to be a binfmt interpreter registered " + "to execute armel binaries in the chroot. Please check " + "that qemu-user-static is installed and properly " + "configured before trying again.") + raise + for hwpack_file in hwpack_files: hwpack_verified = False if os.path.basename(hwpack_file) in verified_files: === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_image_tools/media_create/tests/test_media_create.py 2011-11-17 09:03:31 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2011-11-21 13:49:14 +0000 @@ -2716,6 +2716,7 @@ 'prepare_chroot %(chroot_dir)s %(tmp_dir)s', 'cp %(linaro_hwpack_install)s %(chroot_dir)s/usr/bin', 'mount proc %(chroot_dir)s/proc -t proc', + 'chroot %(chroot_dir)s true', 'cp hwpack1.tgz %(chroot_dir)s', ('%(chroot_args)s %(chroot_dir)s linaro-hwpack-install ' '--force-yes /hwpack1.tgz'),