]> code.ossystems Code Review - openembedded-core.git/commitdiff
uninative: Allow a local own-mirror to work with uninative
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Aug 2017 10:14:14 +0000 (11:14 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Aug 2017 10:31:38 +0000 (11:31 +0100)
The games we play with path manipulation of DL_DIR in uninative mean standard
PREMIRRORS don't work and we can't easily put 'chksum' into the url path from
a url parameter with the current fetcher url handling to make a generic
remapping. We therefore add to PREMIRRORS when we know the chksum to
create a premirror mapping which can work.

[YOCTO #9888]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/uninative.bbclass

index 8f3448336f67a5f5b8f240aff5af6efd05631cf8..a410647328755728d706fb21c40b039c6005e121 100644 (file)
@@ -49,6 +49,12 @@ python uninative_event_fetchloader() {
             localdata = bb.data.createCopy(d)
             localdata.setVar('FILESPATH', "")
             localdata.setVar('DL_DIR', tarballdir)
+            # Our games with path manipulation of DL_DIR mean standard PREMIRRORS don't work
+            # and we can't easily put 'chksum' into the url path from a url parameter with
+            # the current fetcher url handling
+            ownmirror = d.getVar('SOURCE_MIRROR_URL')
+            if ownmirror:
+                localdata.appendVar("PREMIRRORS", " ${UNINATIVE_URL}${UNINATIVE_TARBALL} ${SOURCE_MIRROR_URL}/uninative/%s/${UNINATIVE_TARBALL}" % chksum)
 
             srcuri = d.expand("${UNINATIVE_URL}${UNINATIVE_TARBALL};sha256sum=%s" % chksum)
             bb.note("Fetching uninative binary shim from %s" % srcuri)