Re: New APT version
Manoj Srivastava <srivasta@datasync.com> wrote:
> I just did preliminary analysis of this stuff, just off the
> cuff estimates on my machine, and guestimating up for a full
> distribution. But I think, as a rough estimate, the full du -S
> information may come to 1.8M, and gzipped down would be about 3 times
> the size of the Packages file.
I ran through the *.list files on one of my machines (584 packages
installed) and generated the analog of a du -S file based on these
files. The result was about 100k, and compressed down to 27k.
Note that what I created wasn't exactly the same as a du -S file,
as the counts didn't include config files, and were to the nearest
character rather than to the nearest kilobyte (so real counts would
be a bit more compact, and presumably compress a bit better, and of
course would have different values).
If you want to play with this technique, here's the lines I used to
generate the counts file (as root):
$ cd /var/lib/dpkg/info
$ mkdir /tmp/du
$ for x in *.list; do p=`basename $x .list`; echo $p; for y in `cat $x`; do if [ -f "$y" ]; then wc -c $y ; fi; done | perl -ne '($c, $f)=split; $f=~s:/[^/]*$::; $sum{$f}+= $c; END{for (sort keys %sum) {print "$sum{$_}\t$_\n"}}' >/tmp/du/$p; done
$ cd /tmp/du
$ head -9999 * >.list
$ cp .list .list2
$ gzip -9v .list2
$ ls -l .list .list2; ls | wc -l
--
Raul
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: