On Mon, Feb 16, 2004 at 01:36:27AM +0000, Steve McIntyre wrote: > >Hmmm. I've posted a few bugs so far (#232882, #232885, #232886, >#232887, #232889, #232890). I've since updated the script to check >more of the mirror, and the criteria I'm now checking with are now: > > package > 1MB (previously > 10MB) > > AND > > /usr/share contents > 2MB OR % of package in /usr/share > 80% > >I'm running the new script and it's picking up a lot more packages >(and taking much longer, of course). I'll post the output again when >it's done. I'll wait for discussion before posting more bugs, as this >list promises to be much bigger. And in any case, I'll not post >duplicate bugs against the packages I've already hit above... Right, it's finished. There are a _lot_ more package files listed this time (4305 vs 109), which means it probably covers ~400 packages in total this time. That's why I want to check again on -devel before posting bugs. New list at http://people.debian.org/~93sam/waste2.txt Modified script attached. -- Steve McIntyre, Cambridge, UK. steve@einval.com Is there anybody out there?
#!/bin/sh
MIRROR=/mirror/debian
TMP_EXTRACT=~/tmp/size-check
US_CHECK=2048
PC_CHECK=80
cd $MIRROR
FILES=`find pool -type f -size +1048576c -name '*.deb' | grep -v all.deb | sort`
echo "pkgsize /usr/share % filename"
rm -rf $TMP_EXTRACT
for FILE in $FILES
do
mkdir $TMP_EXTRACT
dpkg --extract $FILE $TMP_EXTRACT
US_SIZE=`du -s $TMP_EXTRACT/usr/share | awk '{print $1}'`
PKG_SIZE=`du -s $TMP_EXTRACT | awk '{print $1}'`
FILENAME=`echo $FILE | sed 's?^\./??'`
PERCENT=`echo "$US_SIZE * 100 / $PKG_SIZE" | bc`
if [ $US_SIZE -gt $US_CHECK ] || [ $PERCENT -gt $PC_CHECK ] ; then
printf "%6d %6d %2d %s\n" $PKG_SIZE $US_SIZE $PERCENT $FILENAME
fi
rm -rf $TMP_EXTRACT
if [ $? -ne 0 ] ; then
mv $TMP_EXTRACT $TMP_EXTRACT.`basename $FILE`
fi
done
Attachment:
signature.asc
Description: Digital signature