[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Top 20 unnecessary dependencies [was: Re: A plan to get rid of unnecessary package dependencies]

Christian Aichinger wrote:

> As a start, I've written a script that searches for unnecessary
> dependencies and reports them. Results are available here:
> http://rerun.lefant.net/checklib
> More detailed information about the meaning of the results are
> available on the web page, the two most important points are
> "problems" and "errors".
> A "problem" means that the package has useless dependencies on
> library packages. This causes the kind of trouble outlined above and
> should be fixed. A HOWTO is here:
> http://rerun.lefant.net/checklib/howto-fix-problems.html

In case it's of interest to anyone, I went through the checklib logs
available on the web page for "problems" and found the libraries that
are most often listed as bogus dependencies.  Here are the top twenty
offenders, listed with the number of packages that (according to
checklib) have each as an unnecessary dependency:

1663: libxext6
1275: libxi6
1196: zlib1g
1174: libx11-6
949: libice6
948: libsm6
940: libfontconfig1
923: libxrender1
918: libxinerama1
918: libxcursor1
905: libxrandr2
697: libatk1.0-0
688: libcairo2
636: libgcc1
610: libxfixes3
536: libpango1.0-0
480: libpng12-0
424: libfreetype6
394: libart-2.0-2
386: libxml2

Most of these are X-related, suggesting that quite a lot of .la and .pc
files are pretty indiscriminate about which X libs they link in.

I used the attached (fairly trivial) script to scan through the log
files.  It is pretty dependent on the exact file format of the logs, though.


Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544

if [ "$1" = download ] ; then
	wget -r --level=1 'http://rerun.lefant.net/checklib/status.PROBLEM.html'

rm -f reverse-deps.txt
touch reverse-deps.txt

for file in rerun.lefant.net/checklib/log.*.html ; do
for lib in `grep -B 1 '^RESULT: PROBLEMS' $file | head -n 1 | tr -d ,` ; do
	line="`grep '[:] '$lib'$' reverse-deps.txt`"
	if [ -n "$line" ] ; then
		n=`echo "$line" | awk '{print $1}' | tr -d ':'`
		n2=$(( $n + 1 ))
		sed -i 's/^'$n'\(: '$lib'\)$/'$n2'\1'/ reverse-deps.txt
		echo '1: '$lib >> reverse-deps.txt

sort -n < reverse-deps.txt > tmp
mv -f tmp reverse-deps.txt

Reply to: