tazpkg rev 153
tazpkg: fix a loop in install list
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 18 08:40:53 2008 +0000 (2008-08-18) |
parents | 005c98b53d42 |
children | 5e6dd7be0a34 |
files | lib/tazpkgbox/package_infos tazpkg |
line diff
1.1 --- a/lib/tazpkgbox/package_infos Tue Aug 12 07:21:53 2008 +0000 1.2 +++ b/lib/tazpkgbox/package_infos Mon Aug 18 08:40:53 2008 +0000 1.3 @@ -125,7 +125,7 @@ 1.4 tazpkg reconfigure $PACKAGE; sleep 2\"</action> 1.5 <action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action> 1.6 </button>" 1.7 -if grep -q ^$PKG$ /var/lib/tazpkg/blocked-packages.list; then 1.8 +if grep -qs ^$PKG$ /var/lib/tazpkg/blocked-packages.list; then 1.9 PACKAGE_INFOS="$PACKAGE_INFOS 1.10 <button> 1.11 <label>Unblock</label>
2.1 --- a/tazpkg Tue Aug 12 07:21:53 2008 +0000 2.2 +++ b/tazpkg Mon Aug 18 08:40:53 2008 +0000 2.3 @@ -445,21 +445,25 @@ 2.4 [ -n "$list" ] || list="$TOP_DIR/packages.list" 2.5 # We can install packages from a local dir by greping 2.6 # the TAZPKG_BASENAME in the local packages.list. 2.7 + found=0 2.8 if [ -f "$list" ]; then 2.9 echo "Checking if $pkg exist in local list... " 2.10 mkdir $TMP_DIR 2.11 for i in $pkg-*.tazpkg; do 2.12 [ -f $i ] || continue 2.13 ( cd $TMP_DIR ; cpio -i receipt > /dev/null) < $i 2.14 + [ "$(. $TMP_DIR/receipt; echo $PACKAGE)" = "$pkg" ] || continue 2.15 if grep -q ^$(package_fullname_in_dir $TMP_DIR).tazpkg$ $list 2.16 then 2.17 + found=1 2.18 tazpkg install $i $root --list=$list 2.19 break 2.20 fi 2.21 done 2.22 rm -rf $TMP_DIR 2.23 + fi 2.24 # Install deps from the mirror. 2.25 - else 2.26 + if [ $found -eq 0 ]; then 2.27 if [ ! -f "$LOCALSTATE/packages.list" ]; then 2.28 tazpkg recharge 2.29 fi 2.30 @@ -1567,7 +1571,7 @@ 2.31 pkg=${f%/files.list} 2.32 echo -n " $pkg" 2.33 if [ -f $pkg/modifiers ]; then 2.34 - echo -n " (known as overridden by $(cat $pkg/modifiers))" 2.35 + echo -n " (overridden by $(echo "$(cat $pkg/modifiers)"))" 2.36 fi 2.37 echo "" 2.38 done