classes: Be consistent about sstate-inputdirs/outputdirs ending with '/'
PATCH 1/1 classes: Be consistent about sstate-inputdirs/outputdirs ending with '/'
If sstate-inputdirs and sstate-outputdirs don't match with ending '/' characters, the manifest file can end up corrupted. This change ensures the metadata is consistent in ending do_populate_root tasks with this character to avoid manifest file corruption.
---
meta/classes/cross.bbclass +1 -1
@@ -54,7 +54,7 @@ base_sbindir = "${bindir}" libdir = "${exec_prefix}/lib/${CROSS_TARGET_SYS_DIR}" libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}" -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" python cross_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise):
meta/classes/native.bbclass +2 -2
@@ -82,8 +82,8 @@ bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}/" # Since we actually install these into situ there is no staging prefix STAGING_DIR_HOST = ""
meta/recipes-core/eglibc/eglibc-initial.inc +1 -1
@@ -72,7 +72,7 @@ eglibcinitial_sstate_postinst() { fi } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/" # We don't install any scripts so there is nothing to evacuate do_evacuate_scripts () {
meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb +1 -1
@@ -33,4 +33,4 @@ do_siteconfig () { : } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
meta/recipes-core/uclibc/uclibc-initial_git.bb +1 -1
@@ -33,4 +33,4 @@ do_siteconfig () { : } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
meta/recipes-devtools/gcc/gcc-cross-initial.inc +2 -2
@@ -74,6 +74,6 @@ sysroot_stage_all() { mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true } -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"
Quoted 73 lines · Richard Purdie
If sstate-inputdirs and sstate-outputdirs don't match with ending '/' characters, the manifest file can end up corrupted. This change ensures the metadata is consistent in ending
do_populate_roottasks with this character to avoid manifest file corruption.Signed-off-by Richard Purdie <[email protected]>---
meta/classes/cross.bbclass +1
-1@@ -54,7 +54,7 @@ base_sbindir = "${bindir}" libdir = "${exec_prefix}/lib/${CROSS_TARGET_SYS_DIR}" libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}" -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" python cross_virtclass_handler () { if not isinstance(e, bb.event.RecipePreFinalise):meta/classes/native.bbclass +2
-2@@ -82,8 +82,8 @@ bindir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" libdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" libexecdir .= "${NATIVE_PACKAGE_PATH_SUFFIX}" -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_NATIVE}/" # Since we actually install these into situ there is no staging prefix STAGING_DIR_HOST = ""meta/recipes-core/eglibc/eglibc-initial.inc +1
-1@@ -72,7 +72,7 @@ eglibcinitial_sstate_postinst() { fi } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/" # We don't install any scripts so there is nothing to evacuate do_evacuate_scripts () {meta/recipes-core/uclibc/uclibc-initial_0.9.33.bb +1
-1@@ -33,4 +33,4 @@ do_siteconfig () { : } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"meta/recipes-core/uclibc/uclibc-initial_git.bb +1
-1@@ -33,4 +33,4 @@ do_siteconfig () { : } -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"meta/recipes-devtools/gcc/gcc-cross-initial.inc +0
-0
meta/recipes-devtools/gcc/gcc-cross-initial.inc sysroot_stage_all() { · line 78
Quoted 7 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc +2
-2@@ -74,6 +74,6 @@ sysroot_stage_all() { mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true } -do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"
Not sure if it can be caused by this, but building from scratch fails today with:
NOTE: Running setscene task 430 of 457 (/OE/oe-core/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.4.3.bb, do_populate_sysroot_setscene)
ERROR: Error executing a python function in /OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb:
OSError: [Errno 2] No such file or directory
ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR: File "do_populate_sysroot_setscene", line 6, in <module>
ERROR:
ERROR: File "do_populate_sysroot_setscene", line 3, in do_populate_sysroot_setscene
ERROR:
ERROR: File "sstate.bbclass", line 3, in sstate_setscene
ERROR:
ERROR: File "sstate.bbclass", line 63, in sstate_installpkg
ERROR:
ERROR: The code that was being executed was:
ERROR: 0002:def do_populate_sysroot_setscene(d):
ERROR: 0003: sstate_setscene(d)
ERROR: 0004:
ERROR: 0005:
ERROR: *** 0006:do_populate_sysroot_setscene(d)
ERROR: 0007:
ERROR: [From file: 'do_populate_sysroot_setscene', lineno: 6, function: <module>]
ERROR: 0001:
ERROR: 0002:def do_populate_sysroot_setscene(d):
ERROR: *** 0003: sstate_setscene(d)
ERROR: 0004:
ERROR: 0005:
ERROR: 0006:do_populate_sysroot_setscene(d)
ERROR: 0007:
ERROR: [From file: 'do_populate_sysroot_setscene', lineno: 3, function: do_populate_sysroot_setscene]
ERROR: 0001:def sstate_setscene(d):
ERROR: 0002: shared_state = sstate_state_fromvars(d)
ERROR: *** 0003: accelerate = sstate_installpkg(shared_state, d)
ERROR: 0004: if not accelerate:
ERROR: 0005: raise bb.build.FuncFailed("No suitable staging package found")
ERROR: 0006:
ERROR: [From file: 'sstate.bbclass', lineno: 3, function: sstate_setscene]
ERROR: 0059: os.remove(fixmefn)
ERROR: 0060:
ERROR: 0061: for state in ss['dirs']:
ERROR: 0062: prepdir(state[1])
ERROR: *** 0063: os.rename(sstateinst + state[0], state[1])
ERROR: 0064: sstate_install(ss, d)
ERROR: 0065:
ERROR: 0066: for plain in ss['plaindirs']:
ERROR: 0067: workdir = d.getVar('WORKDIR', True)
ERROR: [From file: 'sstate.bbclass', lineno: 63, function: sstate_installpkg]
NOTE: recipe gcc-cross-initial-4.7.2-r13: task do_populate_sysroot_setscene: Failed
WARNING: Setscene task 92 (/OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb, do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead
It's not fatal, but it wasn't there yesterday AFAIK.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 14 lines · Martin Jansa
Quoted 13 lines · Richard Purdie
If sstate-inputdirs and sstate-outputdirs don't match with ending '/' characters, the manifest file can end up corrupted. This change ensures the metadata is consistent in ending
do_populate_roottasks with this character to avoid manifest file corruption.meta/recipes-devtools/gcc/gcc-cross-initial.inc +0
-0@@ -74,6 +74,6 @@ sysroot_stage_all() { mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true }
Quoted 8 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc sysroot_stage_all() { · line 78
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc +2
-2-do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"Not sure if it can be caused by this, but building from scratch fails today with:
with some added debug output it looks like trying to move the same directory twice:
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/qemux86-64//lib/
ERROR: Error executing a python function in /OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb:
Cheers,
Quoted 55 lines
NOTE: Running setscene task 430 of 457 (/OE/oe-core/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.4.3.bb,
do_populate_sysroot_setscene)
ERROR: Error executing a python function in /OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb:
OSError: [Errno 2] No such file or directoryERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR: File "do_populate_sysroot_setscene", line 6, in <module>
ERROR:
ERROR: File "do_populate_sysroot_setscene", line 3, indo_populate_sysroot_setscene
ERROR:
ERROR: File "sstate.bbclass", line 3, insstate_setscene
ERROR:
ERROR: File "sstate.bbclass", line 63, insstate_installpkg
ERROR:ERROR: The code that was being executed was: ERROR: 0002:def do_populate_sysroot_setscene(d): ERROR: 0003: sstate_setscene(d) ERROR: 0004: ERROR: 0005: ERROR: *** 0006:do_populate_sysroot_setscene(d) ERROR: 0007: ERROR: [From file: 'do_populate_sysroot_setscene', lineno: 6, function: <module>] ERROR: 0001: ERROR: 0002:def do_populate_sysroot_setscene(d): ERROR: *** 0003: sstate_setscene(d) ERROR: 0004: ERROR: 0005: ERROR: 0006:do_populate_sysroot_setscene(d) ERROR: 0007: ERROR: [From file: 'do_populate_sysroot_setscene', lineno: 3, function: do_populate_sysroot_setscene] ERROR: 0001:def sstate_setscene(d): ERROR: 0002: shared_state = sstate_state_fromvars(d) ERROR: *** 0003: accelerate = sstate_installpkg(shared_state, d) ERROR: 0004: if not accelerate: ERROR: 0005: raise bb.build.FuncFailed("No suitable staging package found") ERROR: 0006: ERROR: [From file: 'sstate.bbclass', lineno: 3, function: sstate_setscene] ERROR: 0059: os.remove(fixmefn) ERROR: 0060: ERROR: 0061: for state in ss['dirs']: ERROR: 0062: prepdir(state[1]) ERROR: *** 0063: os.rename(sstateinst + state[0], state[1]) ERROR: 0064: sstate_install(ss, d) ERROR: 0065: ERROR: 0066: for plain in ss['plaindirs']: ERROR: 0067: workdir = d.getVar('WORKDIR', True) ERROR: [From file: 'sstate.bbclass', lineno: 63, function: sstate_installpkg] NOTE: recipe gcc-cross-initial-4.7.2-r13: task do_populate_sysroot_setscene: Failed WARNING: Setscene task 92 (/OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb, do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead
It's not fatal, but it wasn't there yesterday AFAIK.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 24 lines · Martin Jansa
Quoted 14 lines · Martin Jansa
Quoted 13 lines · Richard Purdie
If sstate-inputdirs and sstate-outputdirs don't match with ending '/' characters, the manifest file can end up corrupted. This change ensures the metadata is consistent in ending
do_populate_roottasks with this character to avoid manifest file corruption.meta/recipes-devtools/gcc/gcc-cross-initial.inc +0
-0@@ -74,6 +74,6 @@ sysroot_stage_all() { mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true }Quoted 8 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc sysroot_stage_all() { · line 78
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc +2
-2-do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"Not sure if it can be caused by this, but building from scratch fails today with:
Quoted 11 lines
with some added debug output it looks like trying to move the same directory twice:
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/qemux86-64//lib/
ERROR: Error executing a python function in /OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb:
There is something missing from after sstate-install-populate-sysroot/. I've pushed a fix into master. Its only appearing when installing from sstate.
Cheers,
Richard
Quoted 37 lines · Richard Purdie
Quoted 24 lines · Martin Jansa
Quoted 14 lines · Martin Jansa
Quoted 13 lines · Richard Purdie
If sstate-inputdirs and sstate-outputdirs don't match with ending '/' characters, the manifest file can end up corrupted. This change ensures the metadata is consistent in ending
do_populate_roottasks with this character to avoid manifest file corruption.meta/recipes-devtools/gcc/gcc-cross-initial.inc +0
-0@@ -74,6 +74,6 @@ sysroot_stage_all() { mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true }Quoted 8 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc sysroot_stage_all() { · line 78
Quoted 4 lines
meta/recipes-devtools/gcc/gcc-cross-initial.inc +2
-2-do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}" -do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}" +do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" +do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"Not sure if it can be caused by this, but building from scratch fails today with:
Quoted 11 lines
with some added debug output it looks like trying to move the same directory twice:
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/
WARNING: Moving /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sstate-install-populate-sysroot/
to /OE/oe-core/tmp-eglibc/work/x86_64-oe-linux/gcc-cross-initial-4.7.2-r13/sysroot-destdir///OE/oe-core/tmp-eglibc/sysroots/qemux86-64//lib/
ERROR: Error executing a python function in /OE/oe-core/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_4.7.bb:
Quoted 3 lines
There is something missing from after sstate-install-populate-sysroot/. I've pushed a fix into master. Its only appearing when installing from sstate.
I've seen this on older releases also...
-M