From patchwork Wed Jul 27 21:25:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Tunnicliffe X-Patchwork-Id: 3180 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 CCA1B23F4D for ; Wed, 27 Jul 2011 21:25:47 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7FABEA1819F for ; Wed, 27 Jul 2011 21:25:47 +0000 (UTC) Received: by qyk30 with SMTP id 30so1478797qyk.11 for ; Wed, 27 Jul 2011 14:25:47 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr275133qci.114.1311801945411; Wed, 27 Jul 2011 14:25:45 -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.229.217.78 with SMTP id hl14cs157856qcb; Wed, 27 Jul 2011 14:25:44 -0700 (PDT) Received: by 10.227.142.141 with SMTP id q13mr6676694wbu.114.1311801943110; Wed, 27 Jul 2011 14:25:43 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id l7si541809wed.10.2011.07.27.14.25.42; Wed, 27 Jul 2011 14:25:43 -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 1QmBbq-0004UG-FU for ; Wed, 27 Jul 2011 21:25:42 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 7192C2EA03F for ; Wed, 27 Jul 2011 21:25:42 +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: 395 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 395: 1. fetch-image-ui now examines the return code of linaro-media-create and reports failures to the... Message-Id: <20110727212542.22477.82648.launchpad@loganberry.canonical.com> Date: Wed, 27 Jul 2011 21:25:42 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13503"; Instance="initZopeless config overlay" X-Launchpad-Hash: afa24d2df2bc09dfd636bd3845eb62965bf8026e Merge authors: James Tunnicliffe (dooferlad) Related merge proposals: https://code.launchpad.net/~dooferlad/linaro-image-tools/fetch-image-ui_use_l-m-c_return_code2/+merge/69544 proposed by: James Tunnicliffe (dooferlad) ------------------------------------------------------------ revno: 395 [merge] committer: James Tunnicliffe branch nick: linaro-image-tools timestamp: Wed 2011-07-27 22:23:15 +0100 message: 1. fetch-image-ui now examines the return code of linaro-media-create and reports failures to the UI. 2. The image_size parameter to linaro-media-create wasn't being passed. This resulted in linaro-fetch-image being unable to create Ubuntu Desktop disk images, which now need to be larger than the default size of 2GB. modified: linaro-fetch-image-ui linaro_image_tools/fetch_image.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-fetch-image-ui' --- linaro-fetch-image-ui 2011-07-22 21:09:29 +0000 +++ linaro-fetch-image-ui 2011-07-27 19:37:38 +0000 @@ -1240,10 +1240,13 @@ elif event[0] == "end": self.event_end(event[1]) - elif event == "terminate" or event[0] == "abort": + elif event == "terminate" or event == "abort": # Process complete. Enable next button. self.wizard.FindWindowById(wx.ID_FORWARD).Enable() - self.populate_file_system_status.SetLabel("Done") + if event == "terminate": + self.populate_file_system_status.SetLabel("Done") + else: + self.populate_file_system_status.SetLabel("Failed") return # Even if queue isn't empty, stop processing it elif event[0] == "update": === modified file 'linaro_image_tools/fetch_image.py' --- linaro_image_tools/fetch_image.py 2011-07-26 10:56:17 +0000 +++ linaro_image_tools/fetch_image.py 2011-07-27 19:39:57 +0000 @@ -580,6 +580,7 @@ self.append_setting_to(args, settings, 'mmc') self.append_setting_to(args, settings, 'image_file') + self.append_setting_to(args, settings, 'image_size') self.append_setting_to(args, settings, 'swap_size') self.append_setting_to(args, settings, 'swap_file') self.append_setting_to(args, settings, 'yes_to_mmc_selection', @@ -681,10 +682,14 @@ self.event_queue.put(("start", "unpack")) while(1): - if self.create_process.poll() != None: # linaro-media-create - # has finished. - self.event_queue.put(("terminate")) # Tell the GUI - return # Terminate the thread + if self.create_process.poll() != None: + # linaro-media-create has finished. Tell the GUI the return + # code so it can report pass/fail. + if self.create_process.returncode: + self.event_queue.put("abort") + else: + self.event_queue.put("terminate") + return self.input = self.create_process.stdout.read(1)