[arch-general] State of the Repositories

keenerd keenerd at gmail.com
Wed Dec 8 19:16:16 EST 2010


If you have not played with Expac yet, you should!  It is a brilliant
program.  Here is a small example of it in action.  Feel free to tease
me for the overuse of pipes.

> find /var/abs -name 'PKGBUILD' | wc -l
3976

> grep -rc '|| return 1$' /var/abs | cut -d ':' -f 2 | awk '{s+=$1} END {print s}'
5929

> find /var/abs -name 'PKGBUILD' | xargs -n 1 -I '{}' grep -l '|| return 1$' '{}' | cut -d '/' -f 5 | sort > return_one

> wc -l return_one
1923 return_one

Half of the repo is littered with '|| return 1'.  We've been assured
it will be phased out as packages are updated.  Sometimes this
happens, sometimes not.

Makepkg was fixed in 0.3.4, released on 2010-06-16.  What packages
have been updated since then?

> expac -S -t '%F' '%b %n' $(pacman -Ssq) | sort > releases

> awk '/2010-06-16/,EOF' < releases | cut -d ' ' -f 2 > updated

> wc -l updated
3276 updated

This is really depressing.  Out of 3973 packages, 3276 have been
updated in the last six months.  No matter how you draw the Venn
diagram, there is a large set of packages in the middle that must both
contain '|| return 1' and have been recently updated.

So which packages are they?

> comm -12 return_one updated > lazy_packages

> wc -l lazy_packages
590 lazy_packages

Let's make a graph to show how bad it continues to be.

> expac -S -t '%Y-%m' '%b' $(cat return_one) | sort | uniq -c | sed 's/^ *//' > return_one_releases
http://kmkeen.com/tmp/return-one-releases.png

If packages were actually cleaned up when updated, the red line would
be flat on zero.  Instead, 50-100 packages with 'return 1' are
released every month.  (And yes, the oldest surviving package is
almost three years old.  Happy birthday perl-passwd-md5, if you make
it another month.)

And finally

> expac -S "%p" $(cat lazy_packages) | sort | uniq


-Kyle
http://kmkeen.com


More information about the arch-general mailing list