summaryrefslogtreecommitdiff
path: root/poky/meta/classes-global
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/classes-global')
-rw-r--r--poky/meta/classes-global/base.bbclass33
-rw-r--r--poky/meta/classes-global/insane.bbclass1
-rw-r--r--poky/meta/classes-global/package.bbclass12
-rw-r--r--poky/meta/classes-global/sanity.bbclass3
-rw-r--r--poky/meta/classes-global/sstate.bbclass4
-rw-r--r--poky/meta/classes-global/uninative.bbclass2
6 files changed, 22 insertions, 33 deletions
diff --git a/poky/meta/classes-global/base.bbclass b/poky/meta/classes-global/base.bbclass
index cbda8d12f0..7c774d250f 100644
--- a/poky/meta/classes-global/base.bbclass
+++ b/poky/meta/classes-global/base.bbclass
@@ -126,11 +126,18 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True):
if notfound and fatal:
bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound))
+# We can't use vardepvalue against do_fetch directly since that would overwrite
+# the other task dependencies so we use an indirect function.
+python fetcher_hashes_dummyfunc() {
+ return
+}
+fetcher_hashes_dummyfunc[vardepvalue] = "${@bb.fetch.get_hashvalue(d)}"
+
addtask fetch
do_fetch[dirs] = "${DL_DIR}"
do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}"
do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}"
-do_fetch[vardeps] += "SRCREV"
+do_fetch[prefuncs] += "fetcher_hashes_dummyfunc"
do_fetch[network] = "1"
python base_do_fetch() {
@@ -606,7 +613,6 @@ python () {
bb.debug(1, "Skipping recipe %s because of incompatible license(s): %s" % (pn, ' '.join(incompatible_lic)))
raise bb.parse.SkipRecipe("it has incompatible license(s): %s" % ' '.join(incompatible_lic))
- needsrcrev = False
srcuri = d.getVar('SRC_URI')
for uri_string in srcuri.split():
uri = bb.fetch.URI(uri_string)
@@ -619,24 +625,17 @@ python () {
# Svn packages should DEPEND on subversion-native
if uri.scheme == "svn":
- needsrcrev = True
d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot')
# Git packages should DEPEND on git-native
elif uri.scheme in ("git", "gitsm"):
- needsrcrev = True
d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot')
# Mercurial packages should DEPEND on mercurial-native
elif uri.scheme == "hg":
- needsrcrev = True
d.appendVar("EXTRANATIVEPATH", ' python3-native ')
d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot')
- # Perforce packages support SRCREV = "${AUTOREV}"
- elif uri.scheme == "p4":
- needsrcrev = True
-
# OSC packages should DEPEND on osc-native
elif uri.scheme == "osc":
d.appendVarFlag('do_fetch', 'depends', ' osc-native:do_populate_sysroot')
@@ -645,7 +644,6 @@ python () {
d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot')
elif uri.scheme == "repo":
- needsrcrev = True
d.appendVarFlag('do_fetch', 'depends', ' repo-native:do_populate_sysroot')
# *.lz4 should DEPEND on lz4-native for unpacking
@@ -676,21 +674,6 @@ python () {
elif path.endswith('.deb'):
d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
- if needsrcrev:
- d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
-
- # Gather all named SRCREVs to add to the sstate hash calculation
- # This anonymous python snippet is called multiple times so we
- # need to be careful to not double up the appends here and cause
- # the base hash to mismatch the task hash
- for uri in srcuri.split():
- parm = bb.fetch.decodeurl(uri)[5]
- uri_names = parm.get("name", "").split(",")
- for uri_name in filter(None, uri_names):
- srcrev_name = "SRCREV_{}".format(uri_name)
- if srcrev_name not in (d.getVarFlag("do_fetch", "vardeps") or "").split():
- d.appendVarFlag("do_fetch", "vardeps", " {}".format(srcrev_name))
-
set_packagetriplet(d)
# 'multimachine' handling
diff --git a/poky/meta/classes-global/insane.bbclass b/poky/meta/classes-global/insane.bbclass
index 960dfc8924..2e53778934 100644
--- a/poky/meta/classes-global/insane.bbclass
+++ b/poky/meta/classes-global/insane.bbclass
@@ -1342,7 +1342,6 @@ python do_qa_patch() {
import re
from oe import patch
- coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '')
for url in patch.src_patches(d):
(_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
diff --git a/poky/meta/classes-global/package.bbclass b/poky/meta/classes-global/package.bbclass
index e8055a9cdc..0338a5c690 100644
--- a/poky/meta/classes-global/package.bbclass
+++ b/poky/meta/classes-global/package.bbclass
@@ -315,13 +315,21 @@ python package_get_auto_pr() {
# Package functions suitable for inclusion in PACKAGEFUNCS
#
-python package_convert_pr_autoinc() {
+python package_setup_pkgv() {
pkgv = d.getVar("PKGV")
+ # Expand SRCPV into PKGV if not present
+ srcpv = bb.fetch.get_pkgv_string(d)
+ if srcpv and "+" in pkgv:
+ d.appendVar("PKGV", srcpv)
+ pkgv = d.getVar("PKGV")
# Adjust pkgv as necessary...
if 'AUTOINC' in pkgv:
d.setVar("PKGV", pkgv.replace("AUTOINC", "${PRSERV_PV_AUTOINC}"))
+}
+
+python package_convert_pr_autoinc() {
# Change PRSERV_PV_AUTOINC and EXTENDPRAUTO usage to special values
d.setVar('PRSERV_PV_AUTOINC', '@PRSERV_PV_AUTOINC@')
d.setVar('EXTENDPRAUTO', '@EXTENDPRAUTO@')
@@ -494,6 +502,7 @@ python do_package () {
oe.qa.handle_error("var-undefined", msg, d)
return
+ bb.build.exec_func("package_setup_pkgv", d)
bb.build.exec_func("package_convert_pr_autoinc", d)
# Check for conflict between renamed packages and existing ones
@@ -577,6 +586,7 @@ addtask do_package_setscene
# Copy from PKGDESTWORK to tempdirectory as tempdirectory can be cleaned at both
# do_package_setscene and do_packagedata_setscene leading to races
python do_packagedata () {
+ bb.build.exec_func("package_setup_pkgv", d)
bb.build.exec_func("package_get_auto_pr", d)
src = d.expand("${PKGDESTWORK}")
diff --git a/poky/meta/classes-global/sanity.bbclass b/poky/meta/classes-global/sanity.bbclass
index abb52fbe21..9b824915f2 100644
--- a/poky/meta/classes-global/sanity.bbclass
+++ b/poky/meta/classes-global/sanity.bbclass
@@ -871,7 +871,8 @@ def check_sanity_everybuild(status, d):
mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
protocols = ['http', 'ftp', 'file', 'https', \
'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
- 'bzr', 'cvs', 'npm', 'sftp', 'ssh', 's3', 'az', 'ftps', 'crate']
+ 'bzr', 'cvs', 'npm', 'sftp', 'ssh', 's3', \
+ 'az', 'ftps', 'crate', 'gs']
for mirror_var in mirror_vars:
mirrors = (d.getVar(mirror_var) or '').replace('\\n', ' ').split()
diff --git a/poky/meta/classes-global/sstate.bbclass b/poky/meta/classes-global/sstate.bbclass
index 95373fd60a..c50198449c 100644
--- a/poky/meta/classes-global/sstate.bbclass
+++ b/poky/meta/classes-global/sstate.bbclass
@@ -769,7 +769,6 @@ def pstaging_fetch(sstatefetch, d):
localdata.setVar('FILESPATH', dldir)
localdata.setVar('DL_DIR', dldir)
localdata.setVar('PREMIRRORS', mirrors)
- localdata.setVar('SRCPV', d.getVar('SRCPV'))
# if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK,
# we'll want to allow network access for the current set of fetches.
@@ -795,9 +794,6 @@ def pstaging_fetch(sstatefetch, d):
except bb.fetch2.BBFetchException:
pass
-pstaging_fetch[vardepsexclude] += "SRCPV"
-
-
def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
diff --git a/poky/meta/classes-global/uninative.bbclass b/poky/meta/classes-global/uninative.bbclass
index 366f7ac793..9630726f33 100644
--- a/poky/meta/classes-global/uninative.bbclass
+++ b/poky/meta/classes-global/uninative.bbclass
@@ -146,7 +146,7 @@ def enable_uninative(d):
d.appendVar("BUILD_LDFLAGS", " -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
d.appendVarFlag("BUILD_LDFLAGS", "vardepvalueexclude", "| -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=${UNINATIVE_LOADER}")
d.appendVarFlag("BUILD_LDFLAGS", "vardepsexclude", "UNINATIVE_LOADER")
- d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
+ d.prependVar("PATH", "${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
python uninative_changeinterp () {
import subprocess