From 116d532813d23aa300b886e5c4d9243463cb075f Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 22 Mar 2017 12:35:37 +0100 Subject: [PATCH] trustfence-cst-native: add premirror for CST package This will allow to get the package from a premirror in case it is not already downloaded in the DL_DIR. https://jira.digi.com/browse/DEL-3051 Signed-off-by: Javier Viguera --- .../trustfence-cst/trustfence-cst-native_2.3.2.bb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-native_2.3.2.bb b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-native_2.3.2.bb index 747ef7e58..77194dbcf 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-native_2.3.2.bb +++ b/meta-digi-arm/recipes-bsp/trustfence-cst/trustfence-cst-native_2.3.2.bb @@ -15,6 +15,17 @@ SRC_URI = " \ file://Makefile \ " +# Usually local files (with file:// protocol) are not checked for +# premirrors. But in this case we want to be able to download the 'cst' +# package from a premirror in case it's not already in the DL_DIR, so prepend +# a premirror for the 'file://' protocol. +python() { + source_mirror_url = d.getVar('SOURCE_MIRROR_URL', True) + if source_mirror_url: + premirrors = d.getVar('PREMIRRORS', True) + d.setVar('PREMIRRORS', "file://cst.* %s \\n %s" % (source_mirror_url, premirrors)) +} + S = "${WORKDIR}/cst-${PV}" inherit native