cookutils diff cook @ rev 940
cook: improve patchit() and all_names(); modules/deps: change the cases upside down, show update stats (it not hangs); lighttpd/index.cgi: use split.db to make search datalist, and to search packages (no need to `ls` ~ 5000 dirs, just one file); lighttpd/cooker.css: style the matches in search page.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jun 22 20:18:08 2017 +0300 (2017-06-22) |
parents | 5ae6788158f0 |
children | 79b65c3a4e40 |
line diff
1.1 --- a/cook Tue Jun 20 03:52:01 2017 +0300 1.2 +++ b/cook Thu Jun 22 20:18:08 2017 +0300 1.3 @@ -545,7 +545,7 @@ 1.4 1.5 IFS=$'\n' 1.6 while read i; do 1.7 - patchname=$(echo $i | cut -d' ' -f1) # allow comments (anything after the space) 1.8 + patchname=$(echo ${i%%#*} | cut -d' ' -f1) # allow comments (anything after the # or space) 1.9 [ -n "$patchname" ] || continue # allow empty lines 1.10 [ -f "$src/done.$patchname" ] && continue # already applied (useful with `cook --continue`) 1.11 newline 1.12 @@ -1093,7 +1093,11 @@ 1.13 1.14 all_names() { 1.15 local split=" $SPLIT " 1.16 - if [ "${split/ $PACKAGE /}" != "$split" ]; then 1.17 + if ! head -n1 $WOK/$pkg/receipt | fgrep -q 'v2'; then 1.18 + # For receipts v1: $SPLIT may present in the $WANTED package, 1.19 + # but split packages have their own receipts 1.20 + echo $PACKAGE 1.21 + elif [ "${split/ $PACKAGE /}" != "$split" ]; then 1.22 # $PACKAGE included somewhere in $SPLIT (probably in the end). 1.23 # We should build packages in the order defined in the $SPLIT. 1.24 echo $SPLIT 1.25 @@ -1451,10 +1455,10 @@ 1.26 > $db 1.27 1.28 cd $WOK 1.29 - for i in *; do 1.30 - [ -f "$WOK/$i/receipt" ] || continue 1.31 + for pkg in *; do 1.32 + [ -f "$WOK/$pkg/receipt" ] || continue 1.33 unset PACKAGE SPLIT 1.34 - . $WOK/$i/receipt 1.35 + . $WOK/$pkg/receipt 1.36 echo -e "$PACKAGE\t$(all_names)" >> $db 1.37 done 1.38 }