tazwok rev 472 4.3
Merge bugfixes from default
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sat Apr 02 14:47:30 2011 +0200 (2011-04-02) |
parents | 15c8e63c3091 2b0f1826a119 |
children | 789cd6566f3a |
files | tazwok |
line diff
1.1 --- a/.hgtags Fri Apr 01 04:47:00 2011 +0200 1.2 +++ b/.hgtags Sat Apr 02 14:47:30 2011 +0200 1.3 @@ -23,3 +23,4 @@ 1.4 bf449151a34258e71f7ec0868f3e521d22995817 4.2.6 1.5 ff412a1044b097a7fb095d22081245fbcb00a187 4.2.7 1.6 7e7265ac0dc0858705f369998a140298c753854b 4.2.8 1.7 +6860bdd720318dfe2cfd5d72b18ee694ffbd30d7 4.2.9
2.1 --- a/tazwok Fri Apr 01 04:47:00 2011 +0200 2.2 +++ b/tazwok Sat Apr 02 14:47:30 2011 +0200 2.3 @@ -720,8 +720,9 @@ 2.4 [ "$src" ] || set_src_path 2.5 [ "$DESTDIR" ] || DESTDIR="$WOK/$PACKAGE/install" 2.6 [ "$CONFIG_SITE" ] || CONFIG_SITE=/etc/config.site 2.7 - export CFLAGS CXXFLAGS MAKEFLAGS DESTDIR BUILD_HOST \ 2.8 - CONFIG_SITE default_prefix \ 2.9 + export CFLAGS=$(echo "$CFLAGS" | tr -s ' ') \ 2.10 + CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ') \ 2.11 + MAKEFLAGS DESTDIR BUILD_HOST CONFIG_SITE default_prefix \ 2.12 default_datarootdir default_datadir default_localedir \ 2.13 default_infodir default_mandir default_build default_host 2.14 local LC_ALL=POSIX LANG=POSIX 2.15 @@ -1555,18 +1556,13 @@ 2.16 2.17 gen_wan_db() 2.18 { 2.19 + rm -f $wan_db 2.20 for RECEIPT in $(fgrep -l WANTED $WOK/*/receipt); do 2.21 WANTED= 2.22 source $RECEIPT 2.23 [ "$WANTED" ] || continue 2.24 - echo -e $PACKAGE"\t"$WANTED >> $tmp/wan_db 2.25 + echo -e $PACKAGE"\t"$WANTED >> $wan_db 2.26 done 2.27 - if ! [ -f $wan_db ] || [ "$(diff -q $tmp/wan_db $wan_db)" ]; then 2.28 - mv -f $tmp/wan_db $wan_db 2.29 - plan_regen_cookorder=yes 2.30 - else 2.31 - rm $tmp/wan_db 2.32 - fi 2.33 } 2.34 2.35 update_wan_db() 2.36 @@ -1576,30 +1572,21 @@ 2.37 grep $'\t'$PACKAGE $wan_db | cut -f 1 | while read wan; do 2.38 echo "$wanted_list" | fgrep -q /$wan/receipt && continue 2.39 sed "/^$wan\t/d" -i $wan_db 2.40 - plan_regen_cookorder=yes 2.41 done 2.42 for RECEIPT in $wanted_list; do 2.43 - WANTED= 2.44 + unset WANTED PACKAGE 2.45 source $RECEIPT 2.46 [ "$WANTED" ] || continue 2.47 - wan_info=$(echo -e $PACKAGE"\t"$WANTED) 2.48 - [ "$wan_info" = "$(grep -m1 ^$PACKAGE$'\t' $wan_db 2>/dev/null)" ] && continue 2.49 sed "/^$PACKAGE\t/d" -i $wan_db 2.50 - echo "$wan_info" >> $wan_db 2.51 - plan_regen_cookorder=yes 2.52 - plan_sort_wandb=yes 2.53 + echo -e $PACKAGE"\t"$WANTED >> $wan_db 2.54 done 2.55 unset wanted_list 2.56 } 2.57 2.58 update_dep_db() 2.59 { 2.60 - dep_info=$(echo -e $PACKAGE"\t "$DEPENDS" \t "$BUILD_DEPENDS' ') 2.61 - [ "$dep_info" = "$(grep -m1 ^$PACKAGE$'\t' $dep_db 2>/dev/null)" ] && return 2.62 sed "/^$PACKAGE\t/d" -i $dep_db 2.63 - echo "$dep_info" >> $dep_db 2.64 - plan_regen_cookorder=yes 2.65 - plan_sort_depdb=yes 2.66 + echo -e $PACKAGE"\t "$DEPENDS" \t "$BUILD_DEPENDS' ' >> $dep_db 2.67 } 2.68 2.69 sort_db() 2.70 @@ -1642,7 +1629,6 @@ 2.71 done 2.72 2.73 tac $tmp/cookorder >> $cookorder 2.74 - unset plan_regen_cookorder 2.75 report end-step 2.76 } 2.77 2.78 @@ -1834,6 +1820,9 @@ 2.79 local cooklist= look_for= with_dev= with_wanted= with_args= log_command="$0 $@" \ 2.80 get_options_list="look_for with_dev with_wanted with_args cooklist use_wanted" 2.81 get_options 2.82 + 2.83 + # Get db md5 to be able to check for changes latter. 2.84 + db_md5=$(md5sum $dep_db $wan_db) 2.85 2.86 # Cooklist is a special case where we need to modify a little 2.87 # scan behavior 2.88 @@ -1882,7 +1871,6 @@ 2.89 check_for_missing && echo $PACKAGE >> $tmp/dep 2.90 fi 2.91 } 2.92 - check_db_status=yes 2.93 unset plan_check_for_missing 2.94 fi 2.95 fi 2.96 @@ -1921,13 +1909,10 @@ 2.97 cat $tmp/dep | sort -u 2.98 fi 2.99 rm -f $tmp/dep $tmp/list 2.100 - if [ "$check_db_status" ]; then 2.101 - [ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb 2.102 - [ "$plan_sort_wandb" ] && sort -o $wan_db $wan_db && unset plan_sort_wandb 2.103 - if [ "$plan_regen_cookorder" ] && \ 2.104 - [ "$(sed 1!d $cookorder)" != "#PlanSort" ]; then 2.105 - grep -q "^#" $cookorder || sed 1i"#PlanSort" -i $cookorder 2.106 - fi 2.107 + if [ "$db_md5" != "$(md5sum $dep_db $wan_db)" ]; then 2.108 + sort -o $dep_db $dep_db 2.109 + sort -o $wan_db $wan_db 2.110 + grep -q "^#" $cookorder || sed 1i"#PlanSort" -i $cookorder 2.111 fi 2.112 } 2.113 2.114 @@ -2064,10 +2049,8 @@ 2.115 { 2.116 if [ "$(sed 1!d $cookorder)" = "#PlanSort" ]; then 2.117 sed 1d -i $cookorder 2.118 - plan_regen_cookorder=yes 2.119 + sort_db 2.120 fi 2.121 - [ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb 2.122 - [ "$plan_regen_cookorder" ] && sort_db 2.123 report step "Generating cooklist" 2.124 if [ -f "$tmp/checked" ]; then 2.125 rm -f $tmp/cooklist 2.126 @@ -2859,13 +2842,13 @@ 2.127 get_tazwok_config 2.128 source_lib report 2.129 report start 2.130 + db_md5=$(md5sum $dep_db $wan_db) 2.131 update_wan_db 2.132 check_for_commit 2.133 - [ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb 2.134 - [ "$plan_sort_wandb" ] && sort -o $wan_db $wan_db && unset plan_sort_wandb 2.135 - if [ "$plan_regen_cookorder" ]; then 2.136 - [ "$(sed 1!d $cookorder)" = "#PlanSort" ] || \ 2.137 - sed 1i"#PlanSort" -i $cookorder 2.138 + if [ "$db_md5" != "$(md5sum $dep_db $wan_db)" ]; then 2.139 + sort -o $dep_db $dep_db 2.140 + sort -o $wan_db $wan_db 2.141 + grep -q "^#" $cookorder || sed 1i"#PlanSort" -i $cookorder 2.142 fi 2.143 cook 2.144 ;;