Bug 3116 - sstate-cache-management.sh prints some error message when running
Summary: sstate-cache-management.sh prints some error message when running
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3
Assignee: Martin Jansa
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-09-14 02:59 UTC by Yi Zhao
Modified: 2012-11-14 09:48 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2012-09-14 02:59:50 UTC
Branch: poky/1.3_M4
Gitinfo: dd3edc9fbb674682947e8218202fdbeef8635dd5

When running sstate-cache-management.sh in a build directory. I got the following error message:
###########
builder@pek-yocto-build2:/buildarea1/yzhao1/poky/build-qemuppc$  ../scripts/sstate-cache-management.sh --cache-dir=./sstate-cache -d
Figuring out the archs in the layers ... find: `/buildarea1/yzhao1/meta*': No such file or directory
find: `/buildarea1/yzhao1/meta*': No such file or directory
Done
Figuring out the archs in the sstate cache dir ... Done
The following archs have been found in the cache dir:
ppc603e qemuppc x86_64

Figuring out the sstate-xxx_deploy-rpm.tgz ... (6 files will be removed)
Figuring out the sstate-xxx_deploy-ipk.tgz ... (0 files will be removed)
Figuring out the sstate-xxx_deploy-deb.tgz ... (0 files will be removed)
Figuring out the sstate-xxx_deploy.tgz ... (0 files will be removed)
Figuring out the sstate-xxx_package.tgz ... (6 files will be removed)
Figuring out the sstate-xxx_populate-lic.tgz ... (2 files will be removed)
Figuring out the sstate-xxx_populate-sysroot.tgz ... (6 files will be removed)
20 files will be removed! Do you want to continue (y/n)? 
############

meta* directories should be in /buildarea1/yzhao1/poky/ , but somehow the script searches the upper directory.
Comment 1 Martin Jansa 2012-09-27 07:35:40 UTC
Patch sent to ML.
Comment 2 Yi Zhao 2012-09-29 02:23:13 UTC
Hi Martin,

I saw your patch had been merged. Would you please add the cgit link and mark the status as RESOLVED ?  Then we will verify it. Thanks.
Comment 4 Yi Zhao 2012-10-09 06:19:02 UTC
The patch didn't fix the issue. It still happened. 

gitinfo: danny/86c9aa8081f107420cd3763d0566d779daddc2b1

##########
$ ../scripts/sstate-cache-management.sh --cache-dir=./sstate-cache -d
Figuring out the archs in the layers ... find: `/buildarea1/yzhao1/meta*': No such file or directory
Done
Figuring out the archs in the sstate cache dir ... Done
The following archs have been found in the cache dir:
mips32 qemumips x86_64
...
...
###########
Comment 5 Martin Jansa 2012-10-09 07:38:12 UTC
There is second fine above that, try:

diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index 4c06fe8..551d2f2 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -172,7 +172,7 @@ remove_duplicated () {
   echo -n "Figuring out the archs in the layers ... "
   oe_core_dir=$(dirname $(dirname $(readlink -e $0)))
   topdir=$(dirname $oe_core_dir)
-  tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include'`"
+  tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include' 2>/dev/null`"
   [ -n "$tunedirs" ] || echo_error "Can't find the tune directory"
   all_machines="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/*' -name '*.conf' 2>/dev/null | sed -e 's/.*\///' -e 's/.conf$//
   all_archs=`grep -r -h "^AVAILTUNES .*=" $tunedirs | sed -e 's/.*=//' -e 's/\"//g'`
Comment 6 Yi Zhao 2012-10-09 09:26:20 UTC
(In reply to comment #5)
> There is second fine above that, try:
> 
> diff --git a/scripts/sstate-cache-management.sh
> b/scripts/sstate-cache-management.sh
> index 4c06fe8..551d2f2 100755
> --- a/scripts/sstate-cache-management.sh
> +++ b/scripts/sstate-cache-management.sh
> @@ -172,7 +172,7 @@ remove_duplicated () {
>    echo -n "Figuring out the archs in the layers ... "
>    oe_core_dir=$(dirname $(dirname $(readlink -e $0)))
>    topdir=$(dirname $oe_core_dir)
> -  tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path
> '*/meta*/conf/machine/include'`"
> +  tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path
> '*/meta*/conf/machine/include' 2>/dev/null`"
>    [ -n "$tunedirs" ] || echo_error "Can't find the tune directory"
>    all_machines="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path
> '*/meta*/conf/machine/*' -name '*.conf' 2>/dev/null | sed -e 's/.*\///' -e
> 's/.conf$//
>    all_archs=`grep -r -h "^AVAILTUNES .*=" $tunedirs | sed -e 's/.*=//' -e
> 's/\"//g'`

This patch could work.
Comment 7 Song Liu 2012-10-10 23:15:52 UTC
Hi Martin,

The patch has been merged. Would you please mark this as resolved?

Thanks!
Comment 9 Yi Zhao 2012-11-14 09:48:42 UTC
Verified with 1.3 danny branch.
gitinfo: 27af23e65f63b41962a7cfddba9e9372d5212396