# HG changeset patch # User Pascal Bellard # Date 1198351621 0 # Node ID 4fd232befebd45ad9f0c8cab291768e705bf0a72 # Parent a74b3a7e64e7714816db912e28faab91b413bf22 Add tazpkg check support diff -r a74b3a7e64e7 -r 4fd232befebd tazpkg --- a/tazpkg Sat Dec 15 13:25:40 2007 +0000 +++ b/tazpkg Sat Dec 22 19:27:01 2007 +0000 @@ -88,6 +88,7 @@ block|unblock Block an installed package version or unblock it for upgrade. get Download a package into the current directory. get-install Download and install a package from the mirror. + check Verify installed packages concistancy. clean-cache Clean all packages downloaded in cache directory. setup-mirror Change the mirror url configuration." } @@ -869,6 +870,32 @@ tazpkg get-install $pkg --forced done ;; + check) + # check installed packages set. + # + check_root + cd $INSTALLED + for PACKAGE in `ls`; do + MSG="Files lost from $PACKAGE :\n" + while read file; do + [ -e "$file" ] && continue + if [ -L "$file" ]; then + MSG="$MSG target of symlink" + fi + echo -e "$MSG $file" + MSG="" + done < $PACKAGE/files.list + DEPENDS="" + . $PACKAGE/receipt + MSG="Missing dependancies for $PACKAGE : \n" + for i in $DEPENDS; do + [ -d $i ] && continue + echo -e "$MSG $i" + MSG="" + done + done + echo "Check completed." + ;; block) # Add a pkg name to the list of blocked packages. #