[OE-core] [PATCH v3] base.bbclass wipe ${S} before unpacking source

Markus Lehtonen markus.lehtonen at linux.intel.com
Tue May 10 07:56:18 UTC 2016


Ping,

Any comments on this one?

Discussion on v2 of the patch:
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/119295.html

Cheers,
  Markus



On 22/03/16 18:47, "Markus Lehtonen" <openembedded-core-bounces at lists.openembedded.org on behalf of markus.lehtonen at linux.intel.com> wrote:

>Make sure that we have a pristine source tree after do_unpack.
>
>[YOCTO #9064]
>
>Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
>---
> meta/classes/base.bbclass | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
>diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>index e066dc9..2acb2b6 100644
>--- a/meta/classes/base.bbclass
>+++ b/meta/classes/base.bbclass
>@@ -133,23 +133,15 @@ python base_do_fetch() {
> 
> addtask unpack after do_fetch
> do_unpack[dirs] = "${WORKDIR}"
>+do_unpack[cleandirs] = "${@d.getVar('S', True) if d.getVar('S', True) != d.getVar('WORKDIR', True) else os.path.join(d.getVar('S', True), 'patches')}"
> python base_do_unpack() {
>     src_uri = (d.getVar('SRC_URI', True) or "").split()
>     if len(src_uri) == 0:
>         return
> 
>-    rootdir = d.getVar('WORKDIR', True)
>-
>-    # Ensure that we cleanup ${S}/patches
>-    # TODO: Investigate if we can remove
>-    # the entire ${S} in this case.
>-    s_dir = d.getVar('S', True)
>-    p_dir = os.path.join(s_dir, 'patches')
>-    bb.utils.remove(p_dir, True)
>-
>     try:
>         fetcher = bb.fetch2.Fetch(src_uri, d)
>-        fetcher.unpack(rootdir)
>+        fetcher.unpack(d.getVar('WORKDIR', True))
>     except bb.fetch2.BBFetchException as e:
>         raise bb.build.FuncFailed(e)
> }
>-- 
>2.6.2
>
>-- 
>_______________________________________________
>Openembedded-core mailing list
>Openembedded-core at lists.openembedded.org
>http://lists.openembedded.org/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list