in order to squeeze Slitaz to the minimum I found it useful to identify packages that are no dependencies and might therefore be removed. Since the (r)depend option of tazpkg comes a bit unhandy I figured out an ash-script that does the job. It's not very performant and there might be more elegant ways to do the job but see it as a start.
Have fun!
-=[Filou]=-
Here's the script:
#! /bin/ash tazpkg list > /var/lib/tazpkg/packages.txt # necessary for 'tazpkg rdepends' command ls /var/lib/tazpkg/installed > /tmp/installed.txt # list of installed packages for testing each one ACT=`head -n 1 /tmp/installed.txt` # name of the first package in the list (to start with) LAST=`tail -n 1 /tmp/installed.txt` # name of the last package in the list Pkg=1 # Init the line to read out of package list
until [ "$ACT" = "$LAST" ] # loop through the package list till last package do Pkg=$((Pkg+1)) # increment line = package name to read Parameter="${Pkg}p" # add a 'p' to the line (e.g. 15p) as sed parameter ACT=`sed -ne $Parameter /tmp/installed.txt` # read the name of the actual package to test DEPs=`tazpkg rdepends $ACT` # use tazpkg rdepends to test for dependencies if [ "$DEPs" = '' ] # if none are reported back then echo $ACT # echo the name of the package fi done # and continue the loop rm /tmp/installed.txt # remove the package list out of /tmp