Return-Path: Received: from egyptian.birch.relay.mailchannels.net (egyptian.birch.relay.mailchannels.net [23.83.209.56]) by mail.openembedded.org (Postfix) with ESMTP id 85D6E77BDA for ; Thu, 30 Mar 2017 08:53:34 +0000 (UTC) X-Sender-Id: hostpapa|x-authuser|pidge@toganlabs.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1192E122E01 for ; Thu, 30 Mar 2017 08:53:35 +0000 (UTC) Received: from hp181.hostpapa.com (unknown [100.96.126.101]) by relay.mailchannels.net (Postfix) with ESMTPA id B88F312269C for ; Thu, 30 Mar 2017 08:53:34 +0000 (UTC) X-Sender-Id: hostpapa|x-authuser|pidge@toganlabs.com Received: from hp181.hostpapa.com (hp181.hostpapa.com [172.20.104.49]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.37); Thu, 30 Mar 2017 08:53:35 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: hostpapa|x-authuser|pidge@toganlabs.com X-MailChannels-Auth-Id: hostpapa X-Eyes-Befitting: 636c38ec63b02dfc_1490864014994_307417010 X-MC-Loop-Signature: 1490864014994:4058679056 X-MC-Ingress-Time: 1490864014993 Received: from ns325767.ip-37-187-157.eu ([37.187.157.197]:40972 helo=ns325767.ovh.net) by hp181.hostpapa.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.87) (envelope-from ) id 1ctVpl-000kTF-FE; Thu, 30 Mar 2017 10:53:34 +0200 From: Elizabeth 'pidge' Flanagan To: bitbake-devel@lists.openembedded.org Date: Thu, 30 Mar 2017 11:06:13 +0200 Message-Id: <1490864773-28529-1-git-send-email-pidge@toganlabs.com> X-Mailer: git-send-email 1.9.1 X-OutGoing-Spam-Status: No, score=5.0 X-AuthUser: pidge@toganlabs.com Subject: [PATCHv2] s3.py: Remove hardcoded aws X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 08:53:36 -0000 This commit looks to see if FETCHCMD_s3 is set and if not, sets it. This is needed because I've use cases where I don't use aws, but s3cmd (due to license). Signed-off-by: Elizabeth 'pidge' Flanagan --- lib/bb/fetch2/s3.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/bb/fetch2/s3.py b/lib/bb/fetch2/s3.py index 27993aa..1629288 100644 --- a/lib/bb/fetch2/s3.py +++ b/lib/bb/fetch2/s3.py @@ -55,13 +55,15 @@ class S3(FetchMethod): ud.localfile = d.expand(urllib.parse.unquote(ud.basename)) + ud.basecmd = d.getVar("FETCHCMD_s3") or "/usr/bin/env aws s3" + def download(self, ud, d): """ Fetch urls Assumes localpath was called first """ - cmd = 'aws s3 cp s3://%s%s %s' % (ud.host, ud.path, ud.localpath) + cmd = '%s cp s3://%s%s %s' % (ud.basecmd, ud.host, ud.path, ud.localpath) bb.fetch2.check_network_access(d, cmd, ud.url) runfetchcmd(cmd, d) @@ -83,7 +85,7 @@ class S3(FetchMethod): Check the status of a URL """ - cmd = 'aws s3 ls s3://%s%s' % (ud.host, ud.path) + cmd = '%s ls s3://%s%s' % (ud.basecmd, ud.host, ud.path) bb.fetch2.check_network_access(d, cmd, ud.url) output = runfetchcmd(cmd, d) -- 1.9.1