cookutils diff cooker @ rev 248
cooker: clean files when a packages is removed
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 28 23:45:31 2011 +0200 (2011-05-28) |
parents | d59cb7bee773 |
children | 89f254f33af3 |
line diff
1.1 --- a/cooker Fri May 27 09:05:58 2011 +0200 1.2 +++ b/cooker Sat May 28 23:45:31 2011 +0200 1.3 @@ -415,18 +415,6 @@ 1.4 separator | log_commits 1.5 clean_exit && echo "" && exit 0 1.6 fi 1.7 - 1.8 - # We may have deleted packages and files in stuff/ 1.9 - cd $wok 1.10 - for pkg in * 1.11 - do 1.12 - if [ ! -d "${wok}-hg/$pkg" ]; then 1.13 - echo "Removing package: $pkg" | log_commits 1.14 - . $wok/$pkg/receipt 1.15 - rm -rf $PKGS/$PACKAGE-$VERSION* 1.16 - rm -rf $wok/$pkg 1.17 - fi 1.18 - done 1.19 1.20 # Get and display modifications. 1.21 cd ${wok}-hg 1.22 @@ -443,6 +431,19 @@ 1.23 echo $pkg >> $commits.tmp 1.24 done 1.25 done 1.26 + 1.27 + # We may have deleted packages and files in stuff/. Remove it and 1.28 + # clean DB as well as log file. 1.29 + cd $wok 1.30 + for pkg in * 1.31 + do 1.32 + if [ ! -d "${wok}-hg/$pkg" ]; then 1.33 + echo "Removing package: $pkg" | log_commits 1.34 + . $wok/$pkg/receipt 1.35 + rm -rf $PKGS/$PACKAGE-$VERSION* $wok/$pkg $LOGS/$pkg.log 1.36 + sed -i "/^${pkg}$/"d $CACHE/blocked $CACHE/broken $commits.tmp 1.37 + fi 1.38 + done 1.39 1.40 # Keep previous commit and discard duplicate lines 1.41 cat $commits $commits.tmp | sed /"^$"/d > $commits.new