Skip to contentSkip to conversation

base.bbclass: If unpacking again, wipe out ${S}/patches

PATCH In review Richard Purdie 2 participants 3 messages Mar 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base.bbclass: If unpacking again, wipe out ${S}/patches

If we unpack again, its assumed the data in any patches directory is invalid since do_patch will run again. This ensures old patch data doesn't get reused in a confused way.

Ideally we should probably wipe out ${S} here but that is probably a change for another time.

[YOCTO #2043 partially]

---

meta/classes/base.bbclass +1 -0
index a76fe55..39d3e78 100644
@@ -94,6 +94,7 @@ python base_do_fetch() {
 
 addtask unpack after do_fetch
 do_unpack[dirs] = "${WORKDIR}"
+do_unpack[cleandirs] = "${S}/patches"
 python base_do_unpack() {
 	src_uri = (d.getVar('SRC_URI', True) or "").split()
 	if len(src_uri) == 0:
#1 lore raw

Op 2 mrt. 2012, om 13:10 heeft Richard Purdie het volgende geschreven:

Quoted 17 lines

If we unpack again, its assumed the data in any patches directory is invalid since do_patch will run again. This ensures old patch data doesn't get reused in a confused way.

Ideally we should probably wipe out ${S} here but that is probably a change for another time.

[YOCTO #2043 partially]

---

meta/classes/base.bbclass +0 -0
index a76fe55..39d3e78 100644
@@ -94,6 +94,7 @@ python base_do_fetch() {
 
Quoted 3 lines

addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
+do_unpack[cleandirs] = "${S}/patches"

This gets clean *before* do_unpack, right? I have a number of recipes that use sources with patches/ as a toplevel subdirectory.

regards,

Koen

#2 lore raw
Quoted 19 lines · Koen Kooi

Op 2 mrt. 2012, om 13:10 heeft Richard Purdie het volgende geschreven:

Quoted 17 lines

If we unpack again, its assumed the data in any patches directory is invalid since do_patch will run again. This ensures old patch data doesn't get reused in a confused way.

Ideally we should probably wipe out ${S} here but that is probably a change for another time.

[YOCTO #2043 partially]

---

meta/classes/base.bbclass +0 -0
index a76fe55..39d3e78 100644
@@ -94,6 +94,7 @@ python base_do_fetch() {
 
Quoted 6 lines
Quoted 3 lines

addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
+do_unpack[cleandirs] = "${S}/patches"

This gets clean *before* do_unpack, right? I have a number of recipes that use sources with patches/ as a toplevel subdirectory.

Yes, bitbake wipes out cleandirs before the task runs. As I mention, we could in theory wipe ${S} there, I'm just a little more nervous about that change.

Cheers,

Richard