summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorElizabeth 'pidge' Flanagan <pidge@toganlabs.com>2017-03-30 11:06:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-30 10:42:18 +0100
commite5e463fbbb19c50d225620f9ec0e7fadbc9278a7 (patch)
treeb499e6cd4b79c638bb5054d0d4e48c3990b494bc /bitbake/lib
parentd828ccb05e3daccfe79323d0ad69fb0198efb64c (diff)
downloadpoky-e5e463fbbb19c50d225620f9ec0e7fadbc9278a7.tar.gz
bitbake: s3.py: Remove hardcoded aws
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). (Bitbake rev: fdeaed70a7d1ff8be1a1de937cb864130b0c2c86) Signed-off-by: Elizabeth 'pidge' Flanagan <pidge@toganlabs.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/s3.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/s3.py b/bitbake/lib/bb/fetch2/s3.py
index 27993aacfe..1629288622 100644
--- a/bitbake/lib/bb/fetch2/s3.py
+++ b/bitbake/lib/bb/fetch2/s3.py
@@ -55,13 +55,15 @@ class S3(FetchMethod):
55 55
56 ud.localfile = d.expand(urllib.parse.unquote(ud.basename)) 56 ud.localfile = d.expand(urllib.parse.unquote(ud.basename))
57 57
58 ud.basecmd = d.getVar("FETCHCMD_s3") or "/usr/bin/env aws s3"
59
58 def download(self, ud, d): 60 def download(self, ud, d):
59 """ 61 """
60 Fetch urls 62 Fetch urls
61 Assumes localpath was called first 63 Assumes localpath was called first
62 """ 64 """
63 65
64 cmd = 'aws s3 cp s3://%s%s %s' % (ud.host, ud.path, ud.localpath) 66 cmd = '%s cp s3://%s%s %s' % (ud.basecmd, ud.host, ud.path, ud.localpath)
65 bb.fetch2.check_network_access(d, cmd, ud.url) 67 bb.fetch2.check_network_access(d, cmd, ud.url)
66 runfetchcmd(cmd, d) 68 runfetchcmd(cmd, d)
67 69
@@ -83,7 +85,7 @@ class S3(FetchMethod):
83 Check the status of a URL 85 Check the status of a URL
84 """ 86 """
85 87
86 cmd = 'aws s3 ls s3://%s%s' % (ud.host, ud.path) 88 cmd = '%s ls s3://%s%s' % (ud.basecmd, ud.host, ud.path)
87 bb.fetch2.check_network_access(d, cmd, ud.url) 89 bb.fetch2.check_network_access(d, cmd, ud.url)
88 output = runfetchcmd(cmd, d) 90 output = runfetchcmd(cmd, d)
89 91