tazpkg rev 25
Add tazpkg check support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Dec 22 19:27:01 2007 +0000 (2007-12-22) |
parents | a74b3a7e64e7 |
children | d83edf083d28 |
files | tazpkg |
line diff
1.1 --- a/tazpkg Sat Dec 15 13:25:40 2007 +0000 1.2 +++ b/tazpkg Sat Dec 22 19:27:01 2007 +0000 1.3 @@ -88,6 +88,7 @@ 1.4 block|unblock Block an installed package version or unblock it for upgrade. 1.5 get Download a package into the current directory. 1.6 get-install Download and install a package from the mirror. 1.7 + check Verify installed packages concistancy. 1.8 clean-cache Clean all packages downloaded in cache directory. 1.9 setup-mirror Change the mirror url configuration." 1.10 } 1.11 @@ -869,6 +870,32 @@ 1.12 tazpkg get-install $pkg --forced 1.13 done 1.14 ;; 1.15 + check) 1.16 + # check installed packages set. 1.17 + # 1.18 + check_root 1.19 + cd $INSTALLED 1.20 + for PACKAGE in `ls`; do 1.21 + MSG="Files lost from $PACKAGE :\n" 1.22 + while read file; do 1.23 + [ -e "$file" ] && continue 1.24 + if [ -L "$file" ]; then 1.25 + MSG="$MSG target of symlink" 1.26 + fi 1.27 + echo -e "$MSG $file" 1.28 + MSG="" 1.29 + done < $PACKAGE/files.list 1.30 + DEPENDS="" 1.31 + . $PACKAGE/receipt 1.32 + MSG="Missing dependancies for $PACKAGE : \n" 1.33 + for i in $DEPENDS; do 1.34 + [ -d $i ] && continue 1.35 + echo -e "$MSG $i" 1.36 + MSG="" 1.37 + done 1.38 + done 1.39 + echo "Check completed." 1.40 + ;; 1.41 block) 1.42 # Add a pkg name to the list of blocked packages. 1.43 #