app-portage/gentoolkit Latest version available: 0.1.38 Latest version installed: 0.1.38 This is really silly bug. pkg-size grep's total, but when i don't use english locale, then the word total might be translated and grep returns zero lines. totals=`cat $file|grep "obj"|awk '{ print $2 }' | sed "s/ /\\ /" | xargs du -scb | grep total | cut -f 1` Reproducible: Always Steps to Reproduce: 1. LANG=et_EE pkg-size net-misc/openssh-3.7.1_p2-r1 Openssh is just example, bug occures with any package. Actual Results: # LANG=et_EE pkg-size net-misc/openssh-3.7.1_p2-r1 net-misc/openssh-3.7.1_p2-r1 0 (0KB) this is wrong, in Estonian locale it is "1456602 kokku" instead "1456602 total" expected Expected Results: # LANG=C pkg-size net-misc/openssh-3.7.1_p2-r1 net-misc/openssh-3.7.1_p2-r1 1456602 (1422KB) Solution: Instead of `grep total` `tail -n 1` can be used as total is the last line of `du` and is there real meaning in: size=0 for i in $totals ; do size=$[size+i] done `cat $file` cat's one file and $totals is one number, so $size would be exactly the same as $totals, right? This script can be improved, like when i do `pkg-size open` then the result would be: dev-libs/openssl-0.9.7c 7254890 (7084KB) net-misc/openssh-3.7.1_p2-r1 1456602 (1422KB) now it returns only first matching package name.
deprecated tool, use `equery size <package>` instead