cookutils rev 274
cooker: check /var/run/cooker.pid
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Dec 23 15:32:52 2011 +0100 (2011-12-23) |
parents | 89f254f33af3 |
children | c3c191298381 |
files | cook cooker |
line diff
1.1 --- a/cook Mon Nov 07 10:38:57 2011 +0100 1.2 +++ b/cook Fri Dec 23 15:32:52 2011 +0100 1.3 @@ -912,7 +912,9 @@ 1.4 . $pkg/receipt 1.5 if [ -f "$PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg" ]; then 1.6 # PACKED_SIZE and UNPACKED_SIZE are only in built receipt 1.7 - . $pkg/taz/*/receipt 1.8 + if [ -s $pkg/taz/*/receipt ]; then 1.9 + . $pkg/taz/*/receipt 1.10 + fi 1.11 # packages.desc lets us search easily in DB 1.12 cat >> $PKGS/packages.desc << EOT 1.13 $PACKAGE | ${VERSION}$EXTRAVERSION | $SHORT_DESC | $CATEGORY | $WEB_SITE
2.1 --- a/cooker Mon Nov 07 10:38:57 2011 +0100 2.2 +++ b/cooker Fri Dec 23 15:32:52 2011 +0100 2.3 @@ -373,8 +373,11 @@ 2.4 cooklist=$CACHE/commits 2.5 if [ -f "$pidfile" ]; then 2.6 pid=$(cat /var/run/cooker.pid) 2.7 - gettext -e "\nStill cooking latest commits with pid:" 2.8 - echo -e " $pid\n" && exit 0 2.9 + if [ -s /proc/$pid/status ]; then 2.10 + gettext -e "\nStill cooking latest commits with pid:" 2.11 + echo -e " $pid\n" && exit 0 2.12 + fi 2.13 + rm -f "$pidfile" 2.14 fi 2.15 2.16 # Start and get a PID file.