From patchwork Tue Mar 3 00:05:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 445496 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 922C3140146 for ; Tue, 3 Mar 2015 11:05:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DDB2A4B661; Tue, 3 Mar 2015 01:05:24 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Icm1Aub0PFKE; Tue, 3 Mar 2015 01:05:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 192684B65B; Tue, 3 Mar 2015 01:05:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 947BF4B65B for ; Tue, 3 Mar 2015 01:05:21 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2oEFfRikf3hs for ; Tue, 3 Mar 2015 01:05:21 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-oi0-f74.google.com (mail-oi0-f74.google.com [209.85.218.74]) by theia.denx.de (Postfix) with ESMTPS id 2F77D4B65A for ; Tue, 3 Mar 2015 01:05:19 +0100 (CET) Received: by mail-oi0-f74.google.com with SMTP id u20so10389824oif.1 for ; Mon, 02 Mar 2015 16:05:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CM4oxfI2RmAItGZVbPWa+38v+dFAzCjHblaIn5LmTYA=; b=CDYpOW0g7ZJlseOVi9ZGSYkcDZbDoSxMUJ+6T+FszguVcKo9EKboZY0RxFIa4yxEAG 8SOvy1UzpjJiq+5CvMsq4PDTODPG4sTv5SSePKvTNruPjNtX/cXXorrv9XDfbRjkFXxR UGa16eb9XSqxkftZ+xmQXQ06i/fR99KYypnHpt7EJmP343eBphbnQCPmBo7OUSAokuEF sbFFqWSHpVuOK6yO+glA2afeNNJfV74ADjLzlOKwaFLX3NfOroctIxh/pDLm4sTfRfTy zCLspwf6dc8SwLiys+VhALhqYt/tZGjCinjJDS5kbu6kysclg2x2W3iZcEcPfmBnr2uN wALA== X-Gm-Message-State: ALoCoQkBQWothb/xIXQWPQd+dPlxIVkvlc8LIBYVUpxPpKR8JrdioET1J2XnN0eCYDmaNudBK4k5 X-Received: by 10.42.22.6 with SMTP id m6mr13774861icb.12.1425341118102; Mon, 02 Mar 2015 16:05:18 -0800 (PST) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id t7si538255yho.3.2015.03.02.16.05.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2015 16:05:18 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id Yp5zzTlh.1; Mon, 02 Mar 2015 16:05:18 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 8B3DD22092A; Mon, 2 Mar 2015 17:05:17 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 2 Mar 2015 17:05:15 -0700 Message-Id: <1425341115-6062-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Cc: Tom Rini Subject: [U-Boot] [PATCH] buildman: Correct toolchain download feature X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Commit d908898 updated the ScanPath() function but not its documentation and not all its callers. This breaks the toolchain check after it is downloaded. Fix it. Signed-off-by: Simon Glass Acked-by: Heiko Schocher --- tools/buildman/toolchain.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 537797a..051da11 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -465,11 +465,15 @@ class Toolchains: # Check that the toolchain works print 'Testing' dirpath = os.path.join(dest, path) - compiler_fname = self.ScanPath(dirpath, True) - if not compiler_fname: + compiler_fname_list = self.ScanPath(dirpath, True) + if not compiler_fname_list: print 'Could not locate C compiler - fetch failed.' return 1 - toolchain = Toolchain(compiler_fname, True, True) + if len(compiler_fname_list) != 1: + print ('Internal error, ambiguous toolchains: %s' % + (', '.join(compiler_fname))) + return 1 + toolchain = Toolchain(compiler_fname_list[0], True, True) # Make sure that it will be found by buildman if not self.TestSettingsHasPath(dirpath):