summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-20 15:17:46 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-06-30 09:54:48 (GMT)
commit5541eba196d85cbccd618756b72f25859a37ec2d (patch)
treea519f85d711258371b826109a286aec52b11c306
parent1e7f861fde8604dfb69b3fd8ef5f46e3b6196e68 (diff)
downloadpoky-master-next.tar.gz
base/kernel/externalsrc: Improve cleandirs handlingmaster-next
(From OE-Core rev: f44b5bddc458c0dca16c965f8cf3e62b218b3018) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass3
-rw-r--r--meta/classes/externalsrc.bbclass4
-rw-r--r--meta/classes/kernel.bbclass5
3 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index cc02de5..584f723 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -165,7 +165,8 @@ python base_do_fetch() {
165addtask unpack after do_fetch 165addtask unpack after do_fetch
166do_unpack[dirs] = "${WORKDIR}" 166do_unpack[dirs] = "${WORKDIR}"
167 167
168do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}" 168SOURCE_CLEANDIRS = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}"
169do_unpack[cleandirs] = "${SOURCE_CLEANDIRS}"
169 170
170python base_do_unpack() { 171python base_do_unpack() {
171 src_uri = (d.getVar('SRC_URI') or "").split() 172 src_uri = (d.getVar('SRC_URI') or "").split()
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 90792a7..f145e0b 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -77,6 +77,8 @@ python () {
77 # Dummy value because the default function can't be called with blank SRC_URI 77 # Dummy value because the default function can't be called with blank SRC_URI
78 d.setVar('SRCPV', '999') 78 d.setVar('SRCPV', '999')
79 79
80 d.setVar("SOURCE_CLEANDIRS", "")
81
80 if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking': 82 if d.getVar('CONFIGUREOPT_DEPTRACK') == '--disable-dependency-tracking':
81 d.setVar('CONFIGUREOPT_DEPTRACK', '') 83 d.setVar('CONFIGUREOPT_DEPTRACK', '')
82 84
@@ -90,7 +92,7 @@ python () {
90 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time 92 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
91 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock") 93 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
92 94
93 for funcname in [task, "base_" + task, "kernel_" + task]: 95 for funcname in [task]:
94 # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean) 96 # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
95 cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '') 97 cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '')
96 setvalue = False 98 setvalue = False
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5d2f17c..b7d3bc0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -172,8 +172,9 @@ inherit ${KERNEL_CLASSES}
172# We need to move these over to STAGING_KERNEL_DIR. We can't just 172# We need to move these over to STAGING_KERNEL_DIR. We can't just
173# create the symlink in advance as the git fetcher can't cope with 173# create the symlink in advance as the git fetcher can't cope with
174# the symlink. 174# the symlink.
175do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" 175SOURCE_CLEANDIRS += "${STAGING_KERNEL_DIR}"
176do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" 176do_unpack[cleandirs] += "${B} ${STAGING_KERNEL_BUILDDIR}"
177do_clean[cleandirs] += " ${SOURCE_CLEANDIRS} ${B} ${STAGING_KERNEL_BUILDDIR}"
177python do_symlink_kernsrc () { 178python do_symlink_kernsrc () {
178 s = d.getVar("S") 179 s = d.getVar("S")
179 if s[-1] == '/': 180 if s[-1] == '/':