cookutils annotate cooker @ rev 746

cook pkgdb: better handle absent packages, make sure to get "mirrors" and "extra.list" for recharge bundle
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jun 30 14:24:13 2015 +0300 (2015-06-30)
parents 38b417993ec2
children 75fe6eb7e7bd
rev   line source
pankso@4 1 #!/bin/sh
pankso@4 2 #
pankso@383 3 # SliTaz Build Bot. The Cooker is a tool to automate and test SliTaz package
pankso@383 4 # building. Please read the Cookbook documentation for more information
paul@54 5 # and discuss with the AUTHORS before adding anything here. PS: no translations
paul@495 6 # here since it's not an end user tool and it's not useful. All devs should
pankso@4 7 # at least understand basic English.
pankso@4 8 #
al@728 9
pankso@431 10 . /usr/lib/slitaz/libcook.sh
pankso@4 11
pankso@49 12 # Set pkg name and use same wok as cook.
pankso@49 13 pkg="$2"
pankso@4 14 wok="$WOK"
pankso@4 15
pankso@81 16 # PID file.
pankso@81 17 pidfile='/var/run/cooker.pid'
pankso@81 18
pankso@4 19 #
pankso@4 20 # Functions
pankso@4 21 #
pankso@4 22
pankso@4 23 usage() {
al@728 24 cat <<EOT
pankso@4 25
pankso@341 26 Usage: cooker [command] [pkg|list|note|hours]
pankso@4 27
pankso@4 28 Options:
pankso@49 29 usage|-u Display this short usage.
pankso@49 30 setup|-s Setup the Cooker environment.
pankso@341 31 setup-cron Setup a cron job for the Cooker.
pankso@383 32 arch-db Create host arch packages DB.
pankso@49 33 note|-n Add a note to the cooknotes.
pankso@49 34 notes|-ns Display all the cooknotes.
pankso@49 35 block|-b Block a package so cook will skip it.
pankso@49 36 unblock|-ub Unblock a blocked package.
pankso@49 37 pkg|-p Same as 'cook pkg' but with cooker log.
pankso@49 38 flavor|-f Cook all packages of a flavor.
paul@54 39 list|-l Cook all packages in the given list.
pankso@49 40 cat|-c Cook all packages of a category.
pankso@79 41 rev|-r Cook packages of a specific revision.
pankso@49 42 all|-a Find and cook all unbuilt packages.
pankso@4 43
pankso@4 44 EOT
pankso@4 45 exit 0
pankso@4 46 }
pankso@4 47
al@728 48
paul@54 49 # Some messages occur in activity but log verbose output when checking for commits
pankso@14 50 # into a log file.
al@728 51
pankso@14 52 log_commits() {
pankso@35 53 sed '/^.\//'d | sed '/^.hg/'d | tee -a $LOGS/commits.log
pankso@14 54 }
pankso@14 55
al@728 56
pankso@81 57 # Clean up before exit when check and cook commits finish.
al@728 58
pankso@81 59 clean_exit() {
al@728 60 rm -f $command; touch $command
pankso@81 61 rm -f $pidfile
pankso@14 62 }
pankso@14 63
al@728 64
pankso@35 65 # Summary for commits.
al@728 66
pankso@35 67 commits_summary() {
pankso@35 68 msg="from revision $cur to $new"
pankso@35 69 [ "$new" == "$cur" ] && msg="revision $new"
pankso@35 70 echo "Will cook $msg"
pankso@35 71 separator
pankso@35 72 echo -e "\nSummary for commits"
pankso@35 73 separator
pankso@35 74 echo "Hg wok revision : $cur"
pankso@35 75 echo "Pulled revision : $new"
al@728 76 echo "Check date : $(date '+%F %T')"
pankso@35 77 }
pankso@35 78
al@728 79
paul@54 80 # Scan packages build deps and fill up cookorder list.
al@728 81
pankso@4 82 cook_order_scan() {
pankso@124 83 rm -f $cookorder
pankso@383 84 touch $cookorder
al@728 85 for pkg in $(cat $cooklist); do
pascal@273 86 unset WANTED BUILD_DEPENDS
pankso@14 87 . $wok/$pkg/receipt
pankso@29 88 # The :: is for web interface color.
pascal@273 89 [ "$WANTED$BUILD_DEPENDS" ] && echo "$pkg :: $WANTED $BUILD_DEPENDS"
al@728 90 for dep in $WANTED $BUILD_DEPENDS; do
pankso@4 91 if grep -q "^$dep$" $cooklist; then
pankso@4 92 if ! grep -q "^$dep$" $cookorder; then
pankso@4 93 echo "$dep" >> $cookorder
pankso@4 94 fi
pankso@4 95 fi
pankso@4 96 done
pankso@4 97 done
pankso@383 98
paul@54 99 # Append unordered packages to cookorder.
al@728 100 for pkg in $(cat $cooklist); do
pankso@4 101 if ! grep -q "^$pkg$" $cookorder; then
pankso@4 102 echo "$pkg" >> $cookorder
pankso@4 103 fi
pankso@4 104 done
pankso@4 105 }
pankso@4 106
al@728 107
paul@54 108 # Scan and rescan until the cooklist is ordered then handle WANTED.
al@728 109
pankso@4 110 cook_order() {
pankso@4 111 time=$(date +%s)
pankso@4 112 scan=0
pankso@4 113
pankso@4 114 # Keep an original cooklist so we do a diff when ordering is finished.
pankso@4 115 cp -f $cooklist $cooklist.0
al@728 116 echo 'cookorder' > $command
al@728 117 echo -e '\nInitial Cooker order scan'
pankso@4 118 separator
pankso@4 119 cook_order_scan
pankso@383 120
pankso@4 121 # Diff between the cooklist and new ordered list ? So copy the last
pankso@4 122 # cookorder to cooklist and rescan it.
al@728 123 while /bin/true; do
pankso@4 124 diff $cooklist $cookorder > $cookorder.diff
pankso@4 125 if [ -s "$cookorder.diff" ]; then
pankso@4 126 scan=$(($scan + 1))
pankso@4 127 echo -e "\nDiff scan: $scan"
pankso@4 128 separator
pankso@4 129 mv -f $cookorder $cooklist
pankso@4 130 cook_order_scan
pankso@4 131 else
pankso@4 132 break
pankso@4 133 fi
pankso@4 134 done
pankso@4 135
paul@647 136 # Keep a diff between submitted cooklist and the ordered.
pankso@4 137 diff $cooklist.0 $cooklist > $cooklist.diff
pankso@4 138 rm -f $cookorder $cookorder.diff $cooklist.0
pankso@4 139
pankso@107 140 # Scan finished: append pkg to WANTED or leave it in the ordered cooklist.
paul@214 141 # TODO: grep the line number to get pkg position and keep it higher.
al@728 142 echo -e '\nHandle WANTED package'
pankso@4 143 separator
al@728 144 for pkg in $(cat $cooklist); do
pankso@4 145 unset WANTED
pankso@14 146 . $wok/$pkg/receipt
al@728 147 for wanted in $WANTED; do
pascal@291 148 echo "$pkg :: $wanted"
pascal@291 149 if grep -q ^${wanted}$ $cooklist; then
pankso@107 150 sed -i -e "/^$pkg$/"d \
pascal@291 151 -e "/^$wanted$/ a $pkg" $cooklist
pankso@107 152 fi
pascal@291 153 done
pankso@4 154 done
pankso@4 155
pankso@4 156 # Show ordered cooklist
al@728 157 echo -e '\nCooklist order'
pankso@4 158 separator
pankso@4 159 cat $cooklist
pankso@4 160 separator
al@728 161
pankso@4 162 time=$(($(date +%s) - $time))
pankso@4 163 pkgs=$(cat $cooklist | wc -l)
al@728 164 echo -e '\nSummary for cookorder'
pankso@4 165 separator
al@728 166 cat <<EOT
pankso@4 167 Ordered packages : $pkgs
pankso@4 168 Scans executed : $scan
pankso@4 169 Scan duration : ${time}s
pankso@4 170 EOT
al@728 171 separator
al@728 172
al@728 173 rm -f $command
pankso@4 174 }
pankso@4 175
al@728 176
pankso@14 177 # Remove blocked (faster this way than grepping before).
al@728 178
pankso@14 179 strip_blocked() {
al@728 180 for pkg in $(cat $blocked); do
pankso@14 181 sed -i /^${pkg}$/d $cooklist
al@728 182 done
al@728 183 sed -i /^$/d $cooklist
pankso@14 184 }
pankso@14 185
al@728 186
paul@54 187 # Use in default mode and with all cmd.
al@728 188
pankso@4 189 cook_commits() {
pankso@4 190 if [ -s "$commits" ]; then
al@728 191 for pkg in $(cat $commits); do
pankso@14 192 echo "cook:$pkg" > $command
pankso@394 193 cook $pkg || broken
pankso@4 194 sed -i /^${pkg}$/d $commits
pankso@4 195 done
pankso@4 196 fi
pankso@4 197 }
pankso@4 198
al@728 199
paul@54 200 # Cook all packages in a cooklist.
al@728 201
pankso@14 202 cook_list() {
al@728 203 for pkg in $(cat $cooklist); do
pankso@79 204 cook $pkg || broken
pankso@79 205 sed -i /^${pkg}$/d $cooklist
pankso@14 206 done
pankso@14 207 }
pankso@14 208
al@728 209
paul@388 210 # Create a arch.$ARCH file for each package cooked for the target host
pankso@383 211 # architecture
pankso@383 212 #
pankso@383 213 # The deal: we dont want all packages handled by cooker commands and stats,
pankso@383 214 # since we dont cross compile all packages for each arch but only a set of
paul@388 215 # packages to provide one full featured desktop, servers and goodies useful
pankso@383 216 # for the host system.
pankso@383 217 #
al@728 218
pankso@383 219 arch_db() {
pankso@383 220 count=0
pankso@391 221 echo "Cleaning packages DB : arch.$ARCH"
pankso@390 222 rm -f $wok/*/arch.$ARCH && cd $wok
pankso@383 223 echo "Creating $ARCH packages DB..."
al@728 224 for pkg in *; do
pascal@693 225 HOST_ARCH=
pascal@693 226 . $wok/$pkg/receipt
pascal@693 227 if [ -n "$HOST_ARCH" ]; then
pankso@678 228 if $(echo "$HOST_ARCH" | egrep -q "$ARCH|any"); then
pankso@678 229 count=$(($count + 1))
pankso@678 230 echo "Adding: $pkg"
pankso@678 231 touch $pkg/arch.$ARCH
pankso@678 232 fi
pankso@678 233 unset HOST_ARCH
pankso@678 234 else
pankso@678 235 # HOST_ARCH not set --> in i486
al@728 236 if [ "$ARCH" == 'i486' ]; then
pankso@678 237 count=$(($count + 1))
pankso@678 238 echo "Adding: $pkg"
pankso@678 239 touch $pkg/arch.$ARCH
pankso@678 240 fi
pankso@383 241 fi
pankso@383 242 done
pankso@391 243 echo "Packages for $ARCH : $count"
pankso@383 244 }
pankso@383 245
al@728 246
pankso@4 247 #
pankso@4 248 # Commands
pankso@4 249 #
al@728 250
pankso@4 251 case "$1" in
pankso@31 252 usage|help|-u|-h)
pankso@4 253 usage ;;
al@728 254
pankso@31 255 setup|-s)
pankso@4 256 # Setup the Cooker environment.
al@728 257 echo -e '\nSetting up the Cooker'
pankso@349 258 mkdir -p $CACHE
pankso@31 259 echo "Cooker setup using: $SLITAZ" | log
pankso@4 260 separator
al@728 261 for pkg in $SETUP_PKGS mercurial rsync tazlito; do
pankso@4 262 [ ! -d "$INSTALLED/$pkg" ] && tazpkg get-install $pkg
pankso@4 263 done
pankso@4 264 mkdir -p $SLITAZ && cd $SLITAZ
al@728 265 if [ -d "${wok}-hg" ]; then
al@728 266 echo -e 'Hg wok already exists.\n'
al@728 267 exit 1
al@728 268 fi
al@728 269 if [ -d "$wok" ]; then
al@728 270 echo -e 'Build wok already exists.\n'
al@728 271 exit 1
al@728 272 fi
pankso@4 273
pankso@4 274 # Directories and files
pankso@4 275 echo "mkdir's and touch files in: $SLITAZ"
pankso@311 276 mkdir -p $PKGS $LOGS $FEEDS $CACHE $SRC
al@728 277 for f in $activity $blocked $broken $commits $cooklist $command; do
pankso@4 278 touch $f
pankso@4 279 done
pankso@14 280 hg clone $WOK_URL ${wok}-hg || exit 1
pankso@60 281 [ -d "$flavors" ] || hg clone $FLAVORS_URL flavors
pankso@4 282 cp -a ${wok}-hg $wok
al@728 283 separator; newline ;;
al@728 284
pankso@383 285 arch-db)
pankso@383 286 # Manually create arch packages DB.
pankso@383 287 arch_db ;;
al@728 288
pankso@341 289 setup-cron)
pankso@341 290 # Create cron job for the cooker.
pankso@341 291 [ "$2" ] || hours=2
pankso@341 292 if [ ! -f "$crontabs" ]; then
pankso@341 293 mkdir -p /var/spool/cron/crontabs
pankso@341 294 fi
pankso@341 295 if ! fgrep -q /usr/bin/cooker $crontabs; then
paul@342 296 echo "# Run SliTaz Cooker every $hours hours" > $crontabs
pankso@421 297 echo "0 */$hours * * * /usr/bin/cooker --output=html" >> $crontabs
pankso@341 298 killall crond 2>/dev/null && /etc/init.d/crond start
pankso@341 299 fi ;;
al@728 300
pankso@341 301 check-cron)
al@728 302 if [ ! -f "$crontabs" ]; then
al@728 303 echo "There is no $crontabs here. Use setup-cron option."
al@728 304 exit 1
al@728 305 fi
pankso@341 306 fgrep /usr/bin/cooker $crontabs ;;
al@728 307
pankso@31 308 note|-n)
al@728 309 # Blocked a pkg and want others to know why? Post a note!
al@728 310 [ -n "$2" ] && echo "$(date '+%F %R') : $2" >> $cooknotes ;;
al@728 311
pankso@31 312 notes|-ns)
pankso@29 313 # View cooknotes.
al@728 314 echo -e '\nCooknotes'
pankso@29 315 separator
pankso@29 316 cat $cooknotes
al@728 317 separator; newline ;;
al@728 318
pankso@49 319 block|-b)
pankso@49 320 # Block a package.
pankso@49 321 [ "$pkg" ] && cook $pkg --block ;;
al@728 322
pankso@49 323 unblock|-ub)
pankso@49 324 # Unblock a package.
pankso@49 325 [ "$pkg" ] && cook $pkg --unblock ;;
al@728 326
pankso@31 327 reverse|-r)
paul@54 328 # Cook all reverse dependencies for a package. This command lets us
paul@54 329 # control the Cooker manually for commits that will cook a lot of packages.
pankso@14 330 #
al@728 331 # Use hg commit? Ex: hg commit -m "Message bla bla | cooker:reverse"
pankso@14 332 #
al@728 333 if [ ! -d "$wok/$pkg" ]; then
al@728 334 echo -e "\nNo package $2 found.\n"
al@728 335 exit 0
al@728 336 fi
al@728 337 rm -f $cooklist; touch $cooklist
pankso@32 338 echo -e "\nReverse cooklist for: $pkg"
al@728 339 separator
al@728 340
al@728 341 cd $wok
al@728 342 for rev in *; do
al@728 343 unset WANTED DEPENDS BUILD_DEPENDS; . $wok/$rev/receipt
pascal@273 344 if echo "$WANTED $DEPENDS $BUILD_DEPENDS" | fgrep -q $pkg; then
pankso@32 345 echo "$rev" | tee -a $cooklist
pankso@4 346 fi
al@728 347 done
al@728 348 separator
pankso@32 349 echo -e "Reverse dependencies found: $(cat $cooklist | wc -l)\n"
pankso@32 350 strip_blocked
pankso@32 351 cook_order | tee $LOGS/cookorder.log
pankso@32 352 cook_list ;;
al@728 353
pankso@31 354 pkg|-p)
pankso@12 355 # Same as 'cook pkg' but with log for web interface.
pankso@394 356 cook $pkg || broken
pankso@81 357 clean_exit ;;
al@728 358
pankso@31 359 cat|-c)
pankso@4 360 # Cook all packages of a category.
pankso@31 361 cat="$2"
al@728 362 rm -f $cooklist; touch $cooklist
al@728 363
al@728 364 cd $wok
al@728 365 for pkg in *; do
al@728 366 unset CATEGORY; . $pkg/receipt
pankso@4 367 [ "$CATEGORY" == "$cat" ] && echo $pkg >> $cooklist
pankso@4 368 done
pankso@14 369 strip_blocked
pankso@14 370 cook_order | tee $LOGS/cookorder.log
pankso@26 371 cook_list ;;
al@728 372
pankso@31 373 flavor|-f)
pankso@21 374 # Cook all packages of a flavor.
pankso@31 375 name="$2"
al@728 376 if [ ! -d "$flavors/$name" ]; then
al@728 377 echo -e "\nSpecified flavor does not exist: $name\n"
al@728 378 exit 1
al@728 379 fi
al@728 380 if [ -d "$flavors/.hg" ]; then
al@728 381 cd $flavors; hg pull -u
al@728 382 fi
al@728 383 list="$flavors/$name/packages.list"
pankso@21 384 cp -a $list $cooklist
pankso@21 385 strip_blocked
pankso@21 386 cook_order | tee $LOGS/cookorder.log
pankso@32 387 cook_list ;;
al@728 388
pankso@31 389 list|-l)
paul@54 390 # Cook a list of packages given in argument.
pankso@31 391 list="$2"
al@728 392 if [ ! -f "$list" ]; then
al@728 393 echo -e "\nSpecified list does not exist: $list\n"
al@728 394 exit 1
al@728 395 fi
pankso@26 396 cp -a $list $cooklist
pankso@26 397 strip_blocked
pankso@98 398 cook_order | tee $LOGS/cookorder.log
pankso@98 399 cook_list ;;
al@728 400
pankso@79 401 rev|-r)
pankso@79 402 # Cook or recook a specific Hg revision.
pankso@79 403 rev="$2"
pankso@79 404 [ "$rev" ] || exit 0
al@728 405 rm -f $cooklist; touch $cooklist
al@728 406
pankso@79 407 cd $wok
al@728 408 for pkg in $(hg log --rev=$rev --template "{files}"); do
al@728 409 echo "$pkg" | cut -d/ -f1 >> $cooklist
pankso@79 410 done
pankso@79 411 strip_blocked
pankso@26 412 cook_order | tee $LOGS/cookorder.log
pankso@26 413 cook_list ;;
al@728 414
pankso@31 415 all|-a)
pankso@4 416 # Try to build all unbuilt packages except blocked's.
al@728 417 echo 'cooker:all' > $command
al@728 418 rm -f $cooklist; touch $cooklist
al@728 419 newline
al@728 420 echo 'Cooker cooklist'
pankso@4 421 separator
pankso@383 422
pankso@118 423 # Find all unbuilt packages. Get EXTRAVERSION from packed receipt
paul@132 424 # if it exists since extra version is added when packing the package.
al@728 425 echo 'Searching for all unbuilt packages' | log
al@728 426
al@728 427 cd $wok
al@728 428 for pkg in *; do
pankso@118 429 unset EXTRAVERSION
pankso@4 430 . $pkg/receipt
pankso@118 431 [ -f "$pkg/taz/$PACKAGE-$VERSION/receipt" ] && \
pankso@118 432 . $pkg/taz/$PACKAGE-$VERSION/receipt
al@728 433 if [ ! -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ]; then
al@728 434 echo $pkg; echo $pkg >> $cooklist
pankso@118 435 fi
pankso@4 436 done
pankso@14 437 strip_blocked
pankso@99 438 cook_order | tee $LOGS/cookorder.log
pankso@13 439 echo "Packages to cook: $(cat $cooklist | wc -l)" | log
pankso@79 440 cook_list ;;
al@728 441
pankso@4 442 *)
pankso@81 443 # Default is to cook all commits if not yet running.
al@728 444 [ -n "$1" ] && usage
slaxemulator@489 445 cooklist=$commits
pankso@81 446 if [ -f "$pidfile" ]; then
slaxemulator@488 447 pid=$(cat $pidfile)
pascal@274 448 if [ -s /proc/$pid/status ]; then
al@728 449 echo -e "\nStill cooking latest commits with pid:"
al@728 450 echo -e " $pid\n"
al@728 451 exit 0
pascal@274 452 fi
pascal@274 453 rm -f "$pidfile"
pankso@81 454 fi
pankso@81 455
pankso@81 456 # Start and get a PID file.
pankso@14 457 rm -f $LOGS/commits.log
slaxemulator@486 458 newline
al@728 459 echo 'Checking for commits' | log_commits
pankso@14 460 separator | tee -a $LOGS/commits.log
pankso@383 461
pankso@82 462 echo $$ > $pidfile
pankso@233 463 trap 'echo -e "\nCooker stopped: PID $$\n" && \
pankso@233 464 rm -f $pidfile $command && exit 1' INT TERM
pankso@383 465
pankso@82 466 echo "Cooker PID : $$" | log_commits
al@728 467 echo "Cooker date : $(date '+%F %T')" | log_commits
pankso@383 468
paul@132 469 # Get revisions. Here we have 2 echoes since we want a msg on screen,
paul@132 470 # in commits log and activity DB without a space before.
pankso@60 471 cd $wok || exit 1
pankso@4 472 cur=$(hg head --template '{rev}\n')
pankso@82 473 echo "Updating wok : ${wok}-hg (rev $cur)" | log_commits
pankso@82 474 echo "Updating wok: ${wok}-hg" | log
al@728 475 echo 'hg:pull' > $command
al@728 476 cd $wok-hg; hg pull -u | log_commits
pankso@4 477 new=$(hg head --template '{rev}\n')
paul@168 478 # Store last rev to be used by CGI so it doesn't need to call hg head
pankso@164 479 # on each load.
slaxemulator@488 480 echo "$new" > $wokrev
pankso@383 481
paul@54 482 # Sync build wok with rsync so we don't take care about removing old
pankso@4 483 # files as before.
pankso@4 484 if [ "$new" -gt "$cur" ]; then
pankso@4 485 echo "Changes found from: $cur to $new" | log
al@728 486 echo 'Syncing build wok with Hg wok...' | log_commits
al@728 487 rsync -r -t -c -l -u -v -D -E $wok-hg/ $wok/ | \
pankso@35 488 sed '/^$/'d | log_commits
pankso@4 489 else
pankso@13 490 echo "No revision changes: $cur vs $new" | log
pankso@14 491 separator | log_commits
al@728 492 clean_exit; newline
al@728 493 exit 0
pankso@4 494 fi
pankso@383 495
pankso@35 496 # Get and display modifications.
al@728 497 cd $wok-hg
pankso@110 498 commits_summary | log_commits
pankso@14 499 cur=$(($cur + 1))
al@728 500 rm -f $commits.tmp; touch $commits.tmp
al@728 501 for rev in $(seq $cur $new); do
al@728 502 for file in $(hg log --rev=$rev --template "{files}"); do
al@728 503 pkg=$(echo $file | cut -d/ -f1)
pankso@36 504 desc=$(hg log --rev=$rev --template "{desc}" $file)
paul@388 505 echo "Committed package : $pkg - $desc" | log_commits
pankso@80 506 echo $pkg >> $commits.tmp
pankso@4 507 done
pankso@4 508 done
pankso@248 509
pankso@248 510 # We may have deleted packages and files in stuff/. Remove it and
pankso@248 511 # clean DB as well as log file.
pankso@248 512 cd $wok
al@728 513 for pkg in *; do
pankso@248 514 if [ ! -d "${wok}-hg/$pkg" ]; then
pankso@248 515 echo "Removing package: $pkg" | log_commits
pankso@248 516 . $wok/$pkg/receipt
pankso@248 517 rm -rf $PKGS/$PACKAGE-$VERSION* $wok/$pkg $LOGS/$pkg.log
slaxemulator@489 518 sed -i "/^${pkg}$/"d $blocked $broken $commits.tmp
pankso@248 519 fi
pankso@248 520 done
pankso@383 521
paul@54 522 # Keep previous commit and discard duplicate lines
pankso@4 523 cat $commits $commits.tmp | sed /"^$"/d > $commits.new
al@728 524 uniq $commits.new > $commits; rm $commits.*
pankso@383 525
paul@388 526 # Handle cross compilation. Create arch packages DB and remove pkgs
pankso@383 527 # not cooked for this arch from the commits list.
pankso@677 528 arch_db
al@728 529 for pkg in $(cat $commits); do
pankso@677 530 if [ ! -f "$wok/$pkg/arch.$ARCH" ]; then
pankso@677 531 echo "Cooker arch : skip $pkg (not included in: $ARCH)" | \
pankso@677 532 log_commits
pankso@677 533 sed -i "/^${pkg}$/"d $commits
pankso@677 534 else
pankso@677 535 echo "Cooker arch : $ARCH" | log_commits
pankso@677 536 fi
pankso@677 537 done
al@728 538
pankso@383 539 # Stats
pankso@109 540 pkgs=$(cat $commits | wc -l)
pankso@100 541 echo "Packages to cook: $pkgs" | log
pankso@109 542 echo "Packages to cook : $pkgs" | log_commits
pankso@35 543 separator | log_commits
slaxemulator@486 544 newline
pankso@14 545 strip_blocked
pankso@14 546 cook_order | tee $LOGS/cookorder.log
pankso@81 547 cook_commits
pankso@81 548 clean_exit ;;
pankso@4 549 esac
pankso@4 550
pankso@4 551 exit 0