diff mbox

archiver: preserve sysroot paths in configured mode

Message ID 1496761395-4499-1-git-send-email-ross.burton@intel.com
State Accepted
Commit aa2240657b015d46e9ba4bcb6264709a82313d83
Headers show

Commit Message

Ross Burton June 6, 2017, 3:03 p.m. UTC
do_ar_configured alters WORKDIR but also expects to be able to run do_configure,
so forcibly expand the paths to the sysroots as otherwise they'll point to a
non-existant directory in the temporary WORKDIR.

[ YOCTO #11584 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/classes/archiver.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.8.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Mikko Ylinen June 6, 2017, 3:42 p.m. UTC | #1
On 06/06/17 18:03, Ross Burton wrote:
> do_ar_configured alters WORKDIR but also expects to be able to run do_configure,

> so forcibly expand the paths to the sysroots as otherwise they'll point to a

> non-existant directory in the temporary WORKDIR.

>

> [ YOCTO #11584 ]

>


This patch is not enough because the problem is in do_unpack_and_patch which
is shared by most archiver modes. This patch fails, e.g., with "original 
+ diff"

https://patchwork.openembedded.org/series/7068/

-- Mikko



-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton June 6, 2017, 3:58 p.m. UTC | #2
On 6 June 2017 at 16:42, Mikko Ylinen <mikko.ylinen@linux.intel.com> wrote:

> This patch is not enough because the problem is in do_unpack_and_patch

> which

> is shared by most archiver modes. This patch fails, e.g., with "original +

> diff"

>

> https://patchwork.openembedded.org/series/7068/

>


Yes, I have yours in my branch too.  There's many ways that the archiver
can fail right now, clearly we need to exercise it a bit more in selftest.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Leonardo Sandoval June 6, 2017, 4:10 p.m. UTC | #3
On Tue, 2017-06-06 at 16:58 +0100, Burton, Ross wrote:
> 

> On 6 June 2017 at 16:42, Mikko Ylinen <mikko.ylinen@linux.intel.com>

> wrote:

>         This patch is not enough because the problem is in

>         do_unpack_and_patch which

>         is shared by most archiver modes. This patch fails, e.g., with

>         "original + diff"

>         

>         https://patchwork.openembedded.org/series/7068/

>         

> 

> Yes, I have yours in my branch too.  There's many ways that the

> archiver can fail right now, clearly we need to exercise it a bit more

> in selftest.

> 

Right, and this bug tracks the progress

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11422

> 

> Ross

> -- 

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox

Patch

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 82f0b16..18c5b96 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -222,6 +222,10 @@  python do_ar_patched() {
 python do_ar_configured() {
     import shutil
 
+    # Forcibly expand the sysroot paths as we're about to change WORKDIR
+    d.setVar('RECIPE_SYSROOT', d.getVar('RECIPE_SYSROOT'))
+    d.setVar('RECIPE_SYSROOT_NATIVE', d.getVar('RECIPE_SYSROOT_NATIVE'))
+
     ar_outdir = d.getVar('ARCHIVER_OUTDIR')
     if d.getVarFlag('ARCHIVER_MODE', 'src') == 'configured':
         bb.note('Archiving the configured source...')