summaryrefslogtreecommitdiffstats
path: root/tools/compute-rpm-sizes.sh
blob: 5425d3fd7da8badf66546c50d9d7e26c7090c124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

chroot=$1
name=$2

if [ -z "$chroot" ] || [ -z "$name" ]; then
    echo "usage: $0 <chroot> <name>"
fi

full=$name-full.lst
leaves=$name-leaves.lst
chroot $chroot sh -c "rpm -qa --qf '%{size}      \t%{name}\n' | sort -n" > $full
chroot $chroot sh -c "urpmi_rpm-find-leaves | xargs rpm -q --qf '%{size}       \t%{name}\n' | sort -n" > $leaves

echo $full $leaves