diff options
author | Christopher Larson <kergoth@gmail.com> | 2017-05-13 02:46:26 +0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-02 13:36:57 +0100 |
commit | ab4e578b86efcf533c43dfa76e97ea98cd9a5808 (patch) | |
tree | f8bbda21f1379d29ac0aa56efc444a16f9895389 /bitbake/lib/bb/fetch2/npm.py | |
parent | 60ade6074e8b1320f72c7d011b13bac9fa7f874e (diff) | |
download | poky-ab4e578b86efcf533c43dfa76e97ea98cd9a5808.tar.gz |
bitbake: fetch: support multiple mirror tarball filenames
Remove ud.mirrortarball in favor of ud.mirrortarballs. Each tarball will be
attempted, in order, and the first available will be used. This is needed for
git shallow mirror tarball support, as we want to be able to use either
a shallow or full mirror tarball.
(Bitbake rev: 02eebee6709e57b523862257f75929e64f16d6b0)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/npm.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/npm.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py index 73a75fe989..5f799724e7 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py | |||
@@ -91,9 +91,10 @@ class Npm(FetchMethod): | |||
91 | ud.prefixdir = prefixdir | 91 | ud.prefixdir = prefixdir |
92 | 92 | ||
93 | ud.write_tarballs = ((d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0") != "0") | 93 | ud.write_tarballs = ((d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0") != "0") |
94 | ud.mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version) | 94 | mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version) |
95 | ud.mirrortarball = ud.mirrortarball.replace('/', '-') | 95 | mirrortarball = ud.mirrortarball.replace('/', '-') |
96 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) | 96 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), mirrortarball) |
97 | ud.mirrortarballs = [mirrortarball] | ||
97 | 98 | ||
98 | def need_update(self, ud, d): | 99 | def need_update(self, ud, d): |
99 | if os.path.exists(ud.localpath): | 100 | if os.path.exists(ud.localpath): |