summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2014-01-29 22:03:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-02 11:30:33 +0000
commita397dec90bf968e281f9135e9e0683c1cb19b91c (patch)
treef3de253bb2bbd338c375f7e46d9ed575e1e64f95
parenta8a7e7b28935d87eaba56281ba46a2aa2270f700 (diff)
downloadpoky-a397dec90bf968e281f9135e9e0683c1cb19b91c.tar.gz
sstate-cache-management.sh: Fix rm_by_stamps() to work after SSTATE_SWSPEC change
* format of filenames for sstate archives was changed in: commit 6f823a23c5f1d0ffa0a27db1c1bc1907de788505 Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Fri Dec 20 12:06:02 2013 +0000 Subject: sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally * this one doesn't need special care for old sstate- names they will be removed automatically as they don't match with any checksum in rigth format from stamps directory (From OE-Core rev: aa36f9c9b5abac58de899f98803d1c4375678044) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/sstate-cache-management.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
index 21ca47002b..30ba8c6241 100755
--- a/scripts/sstate-cache-management.sh
+++ b/scripts/sstate-cache-management.sh
@@ -320,11 +320,11 @@ rm_by_stamps (){
320 echo "Done" 320 echo "Done"
321 321
322 # Save all the state file list to a file 322 # Save all the state file list to a file
323 find $cache_dir -name 'sstate-*.tgz' | sort -u -o $cache_list 323 find $cache_dir -name 'sstate*.tgz' | sort -u -o $cache_list
324 324
325 echo -n "Figuring out the files which will be removed ... " 325 echo -n "Figuring out the files which will be removed ... "
326 for i in $all_sums; do 326 for i in $all_sums; do
327 grep ".*-${i}_.*" $cache_list >>$keep_list 327 grep ".*/sstate:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:${i}_.*" $cache_list >>$keep_list
328 done 328 done
329 echo "Done" 329 echo "Done"
330 330
@@ -332,7 +332,7 @@ rm_by_stamps (){
332 sort -u $keep_list -o $keep_list 332 sort -u $keep_list -o $keep_list
333 to_del=`comm -1 -3 $keep_list $cache_list` 333 to_del=`comm -1 -3 $keep_list $cache_list`
334 gen_rmlist $rm_list "$to_del" 334 gen_rmlist $rm_list "$to_del"
335 let total_deleted=(`cat $rm_list | wc -w`) 335 let total_deleted=`cat $rm_list | wc -w`
336 if [ $total_deleted -gt 0 ]; then 336 if [ $total_deleted -gt 0 ]; then
337 [ $debug -gt 0 ] && cat $rm_list 337 [ $debug -gt 0 ] && cat $rm_list
338 read_confirm 338 read_confirm