Patchwork [V5,04/10] populate-volatile.sh: use $ROOT_DIR/var/volatile/tmp as TMPDIR

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Aug. 8, 2013, 6:16 a.m.
Message ID <6bab50b7175af465199fd8efd3f1ff402b7e375d.1375941355.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/55295/
State New
Headers show

Comments

Qi.Chen@windriver.com - Aug. 8, 2013, 6:16 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

It's possible that a 'No such directory' error occurs when doing
check_requirement in populate-volatile.sh at rootfs time. This is
because the $ROOT_DIR/var/tmp might be a dead link.

Use $ROOT_DIR/var/volatile/tmp as the TMPDIR instead to avoid this
error.

[YOCTO #4883]
[YOCTO #4103]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../initscripts-1.0/populate-volatile.sh           |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Saul Wold - Aug. 9, 2013, 9:34 p.m.
On 08/07/2013 11:16 PM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> It's possible that a 'No such directory' error occurs when doing
> check_requirement in populate-volatile.sh at rootfs time. This is
> because the $ROOT_DIR/var/tmp might be a dead link.
>
> Use $ROOT_DIR/var/volatile/tmp as the TMPDIR instead to avoid this
> error.
>
Can you use /run here instead it should be mounted early in the process 
also?

Sau!

> [YOCTO #4883]
> [YOCTO #4103]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   .../initscripts-1.0/populate-volatile.sh           |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> index 392879f..253fe1b 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> @@ -23,7 +23,7 @@ ROOTFS_READ_ONLY=`is_rootfs_readonly`
>   [ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
>
>   CFGDIR="${ROOT_DIR}/etc/default/volatiles"
> -TMPROOT="${ROOT_DIR}/var/tmp"
> +TMPROOT="${ROOT_DIR}/var/volatile/tmp"
>   COREDEF="00_core"
>
>   [ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
>

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 392879f..253fe1b 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -23,7 +23,7 @@  ROOTFS_READ_ONLY=`is_rootfs_readonly`
 [ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
 
 CFGDIR="${ROOT_DIR}/etc/default/volatiles"
-TMPROOT="${ROOT_DIR}/var/tmp"
+TMPROOT="${ROOT_DIR}/var/volatile/tmp"
 COREDEF="00_core"
 
 [ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."