tazwok rev 288
Automated merge with https://bitbucket.org/gokhlayeh/tazwok-experimental
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Feb 15 01:29:39 2011 +0100 (2011-02-15) |
parents | 6d02376d4481 d99c36a1ea3a |
children | 13be876b020c |
files | tazwok |
line diff
1.1 --- a/tazwok Mon Feb 14 19:22:03 2011 +0000 1.2 +++ b/tazwok Tue Feb 15 01:29:39 2011 +0100 1.3 @@ -552,21 +552,29 @@ 1.4 1.5 if [ "$nounpack" ]; then 1.6 [ -d "$tmp_src" ] && rm -r $tmp_src 1.7 + report end-step 1.8 return 1.9 fi 1.10 - if [ ! -d "$src" ]; then 1.11 - if ! check_for_var_modification src _pkg; then 1.12 - src="${src%/*}/$(ls $tmp_src)" 1.13 + if [ ! -d "$src" ]|| [ "$target" ]; then 1.14 + # Permissions settings. 1.15 + chown -R root.root "$tmp_src" 1.16 + if [ -d "$src" ]; then 1.17 + mkdir -p $src 1.18 + for f in $tmp_src/*/*; do 1.19 + cp -a $f $src || { report end-step; rm -r $tmp_src; return 1; } 1.20 + done 1.21 + else 1.22 + if ! check_for_var_modification src _pkg && ! [ "$target" ]; then 1.23 + src="${src%/*}/$(ls $tmp_src)" 1.24 + fi 1.25 + mv $(echo $tmp_src/*) "$src" || { report end-step; rm -r $tmp_src; return 1; } 1.26 fi 1.27 - mv $(echo $tmp_src/*) "$src" 1.28 rm -r $tmp_src 1.29 - 1.30 - # Permissions settings. 1.31 - chown -R root.root "$src" 1.32 else 1.33 [ -d "$tmp_src" ] && rm -r $tmp_src 1.34 echo "There's already something at $src. Abort." >&2 1.35 fi 1.36 + report end-step 1.37 } 1.38 1.39 # Log and execute compile_rules function if it exists, to configure and 1.40 @@ -1869,6 +1877,16 @@ 1.41 report end-step 1.42 } 1.43 1.44 +look_for_missing_pkg() 1.45 +{ 1.46 + for pkg in $(cat $PACKAGES_REPOSITORY/$1); do 1.47 + grep -q ^$pkg$ $INCOMING_REPOSITORY/packages.txt \ 1.48 + $PACKAGES_REPOSITORY/packages.txt || \ 1.49 + continue 1.50 + echo $pkg 1.51 + done 1.52 +} 1.53 + 1.54 check_for_incoming() 1.55 { 1.56 [ -s $INCOMING_REPOSITORY/packages.desc ] || {