diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2014-03-01 21:52:02 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-05 15:50:20 +0000 |
| commit | 8615d574a8704318ebc12e4d5d591caa19c274b0 (patch) | |
| tree | 26651d58df89f3bf7614e76730c0ec91229ef4e3 /scripts/sstate-cache-management.sh | |
| parent | 99183f9c450a56f8d2fa7485902b48a993bf551c (diff) | |
| download | poky-8615d574a8704318ebc12e4d5d591caa19c274b0.tar.gz | |
sstate-cache-management.sh: Don't use echo -n
* when debug is enabled it causes more confusion than what it's gaining
without debug enabled
(From OE-Core rev: 53899da20cd439ae53974e507f3dd86cd6879455)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/sstate-cache-management.sh')
| -rwxr-xr-x | scripts/sstate-cache-management.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh index e55eb239f2..d741ec93f2 100755 --- a/scripts/sstate-cache-management.sh +++ b/scripts/sstate-cache-management.sh | |||
| @@ -101,13 +101,13 @@ do_nothing () { | |||
| 101 | 101 | ||
| 102 | # Read the input "y" | 102 | # Read the input "y" |
| 103 | read_confirm () { | 103 | read_confirm () { |
| 104 | echo -n "$total_deleted from $total_files files will be removed! " | 104 | echo "$total_deleted from $total_files files will be removed! " |
| 105 | if [ "$confirm" != "y" ]; then | 105 | if [ "$confirm" != "y" ]; then |
| 106 | echo -n "Do you want to continue (y/n)? " | 106 | echo "Do you want to continue (y/n)? " |
| 107 | while read confirm; do | 107 | while read confirm; do |
| 108 | [ "$confirm" = "Y" -o "$confirm" = "y" -o "$confirm" = "n" \ | 108 | [ "$confirm" = "Y" -o "$confirm" = "y" -o "$confirm" = "n" \ |
| 109 | -o "$confirm" = "N" ] && break | 109 | -o "$confirm" = "N" ] && break |
| 110 | echo -n "Invalid input \"$confirm\", please input 'y' or 'n': " | 110 | echo "Invalid input \"$confirm\", please input 'y' or 'n': " |
| 111 | done | 111 | done |
| 112 | else | 112 | else |
| 113 | echo | 113 | echo |
| @@ -178,7 +178,7 @@ remove_duplicated () { | |||
| 178 | 178 | ||
| 179 | if [ -z "$extra_archs" ] ; then | 179 | if [ -z "$extra_archs" ] ; then |
| 180 | # Find out the archs in all the layers | 180 | # Find out the archs in all the layers |
| 181 | echo -n "Figuring out the archs in the layers ... " | 181 | echo "Figuring out the archs in the layers ... " |
| 182 | oe_core_dir=$(dirname $(dirname $(readlink -e $0))) | 182 | oe_core_dir=$(dirname $(dirname $(readlink -e $0))) |
| 183 | topdir=$(dirname $oe_core_dir) | 183 | topdir=$(dirname $oe_core_dir) |
| 184 | tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include' 2>/dev/null`" | 184 | tunedirs="`find $topdir/meta* ${oe_core_dir}/meta* $layers -path '*/meta*/conf/machine/include' 2>/dev/null`" |
| @@ -201,13 +201,13 @@ remove_duplicated () { | |||
| 201 | sstate_files_list=`mktemp` || exit 1 | 201 | sstate_files_list=`mktemp` || exit 1 |
| 202 | find $cache_dir -name 'sstate:*:*:*:*:*:*:*.tgz*' >$sstate_files_list | 202 | find $cache_dir -name 'sstate:*:*:*:*:*:*:*.tgz*' >$sstate_files_list |
| 203 | 203 | ||
| 204 | echo -n "Figuring out the suffixes in the sstate cache dir ... " | 204 | echo "Figuring out the suffixes in the sstate cache dir ... " |
| 205 | sstate_suffixes="`sed 's%.*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^_]*_\([^:]*\)\.tgz.*%\1%g' $sstate_files_list | sort -u`" | 205 | sstate_suffixes="`sed 's%.*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^_]*_\([^:]*\)\.tgz.*%\1%g' $sstate_files_list | sort -u`" |
| 206 | echo "Done" | 206 | echo "Done" |
| 207 | echo "The following suffixes have been found in the cache dir:" | 207 | echo "The following suffixes have been found in the cache dir:" |
| 208 | echo $sstate_suffixes | 208 | echo $sstate_suffixes |
| 209 | 209 | ||
| 210 | echo -n "Figuring out the archs in the sstate cache dir ... " | 210 | echo "Figuring out the archs in the sstate cache dir ... " |
| 211 | # Using this SSTATE_PKGSPEC definition it's 6th colon separated field | 211 | # Using this SSTATE_PKGSPEC definition it's 6th colon separated field |
| 212 | # SSTATE_PKGSPEC = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:" | 212 | # SSTATE_PKGSPEC = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:" |
| 213 | for arch in $all_archs; do | 213 | for arch in $all_archs; do |
| @@ -296,7 +296,7 @@ remove_duplicated () { | |||
| 296 | read_confirm | 296 | read_confirm |
| 297 | if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then | 297 | if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then |
| 298 | for list in `ls $remove_listdir/`; do | 298 | for list in `ls $remove_listdir/`; do |
| 299 | echo -n "Removing $list.tgz (`cat $remove_listdir/$list | wc -w` files) ... " | 299 | echo "Removing $list.tgz (`cat $remove_listdir/$list | wc -w` files) ... " |
| 300 | # Remove them one by one to avoid the argument list too long error | 300 | # Remove them one by one to avoid the argument list too long error |
| 301 | for i in `cat $remove_listdir/$list`; do | 301 | for i in `cat $remove_listdir/$list`; do |
| 302 | rm -f $verbose $i | 302 | rm -f $verbose $i |
| @@ -328,7 +328,7 @@ rm_by_stamps (){ | |||
| 328 | package_write_rpm package_write_deb package packagedata deploy" | 328 | package_write_rpm package_write_deb package packagedata deploy" |
| 329 | 329 | ||
| 330 | # Figure out all the md5sums in the stamps dir. | 330 | # Figure out all the md5sums in the stamps dir. |
| 331 | echo -n "Figuring out all the md5sums in stamps dir ... " | 331 | echo "Figuring out all the md5sums in stamps dir ... " |
| 332 | for i in $suffixes; do | 332 | for i in $suffixes; do |
| 333 | # There is no "\.siginfo" but "_setcene" when it is mirrored | 333 | # There is no "\.siginfo" but "_setcene" when it is mirrored |
| 334 | # from the SSTATE_MIRRORS, use them to figure out the sum. | 334 | # from the SSTATE_MIRRORS, use them to figure out the sum. |
| @@ -345,7 +345,7 @@ rm_by_stamps (){ | |||
| 345 | # Save all the state file list to a file | 345 | # Save all the state file list to a file |
| 346 | find $cache_dir -name 'sstate*.tgz' | sort -u -o $cache_list | 346 | find $cache_dir -name 'sstate*.tgz' | sort -u -o $cache_list |
| 347 | 347 | ||
| 348 | echo -n "Figuring out the files which will be removed ... " | 348 | echo "Figuring out the files which will be removed ... " |
| 349 | for i in $all_sums; do | 349 | for i in $all_sums; do |
| 350 | grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:${i}_.*" $cache_list >>$keep_list | 350 | grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:${i}_.*" $cache_list >>$keep_list |
| 351 | done | 351 | done |
