Random Ports Statistics

Different files - same checksums

cd /usr/ports/distfiles && find -s . -not -type d | xargs sha256 > ~/oursha
find /usr/ports/ -iname \*distinfo\* | xargs grep -H ^SHA256 > ~/theirsha

Now the numbers:

sat@vesta:~> cat theirsha | cut -f2 -d= | cut -c2- | wc -l
   18714
sat@vesta:~> cat theirsha | cut -f2 -d= | cut -c2- | sort -u | wc -l
   18103
sat@vesta:~> cat theirsha | cut -f2- -d: | wc -l
   18714
sat@vesta:~> cat theirsha | cut -f2- -d: | sort -u| wc -l
   18276

We're wastefully redownloading 18276-18103=173 files!

WITH!

find /usr/ports/ -iname \*makefile\* | xargs grep WITH > WITHdump
cat WITHdump | sed -Ee 's/-D//;s/.*(WITH[[:alnum:]_]*).*/\1/' | sort -u > WITHdump.sortu
sat@vesta:~/bsdports> wc -l WITHdump.sortu 
    3566 WITHdump.sortu
sat@vesta:~/bsdports> wc -l /usr/ports/KNOBS 
     104 /usr/ports/KNOBS

So much for documented knobs

distinfo

sat@vesta:/usr/ports> find -s [a-z] -iname \*distinfo\* | xargs -I % -n1 sed -e 's\!^\!%:\!' % > ~/bsdports/globdistinfo
sat@vesta:~/bsdports> grep SIZE globdistinfo | wc -l
   18823
sat@vesta:~/bsdports> grep MD5 globdistinfo | wc -l
   19060
sat@vesta:~/bsdports> grep SHA256 globdistinfo | wc -l
   18827

Lucky number 777

sat@vesta:~> find /usr/ports/ -iname Makefile\* | xargs grep 777 > ~/bsdports/777dump
sat@vesta:~/bsdports> cat 777dump | cut -c12- | cut -f1 -d: | sort -u
sat@vesta:~/bsdports> cat 777dump | cut -f1 -d: | sort -u | xargs grep MAIN | cut -f2 -d= | tr -d " \t" | sort -u

AndrewPantyukhin/Ports/Stats (last edited 2009-12-11 15:58:51 by UlrichSpoerlein)