[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: `du' control files



> Yes, it's redundant now, but the du's of all the packages might be
> extracted and made available in some public place via http.  That way

Of course, this extraction could be done with
dpkg --fsys-tarfile | tar tvf - | perl -lane \
  '@f=split("/",$F[5]); $ds{join("/",@f[0..$#f-1])} += $F[2];' \
   -e 'END { for $i (sort keys ds) { print $ds{$i}," ",$i }};'

This matches du -S, not normal du, and it is bytes, not blocks; for
directory-inclusive summaries you could just tweek the END clause a
little, or do the original sums using something like

   for $i (0..$#f-1) { $ds{join("/",@f[0..$i])} += $F[2]; }

instead of just the single sum (I've tested the first version, but not
this modification.)  So generating the data for such a use can easily
be done with no loss later on [assuming we have no sparse files in
debs, but I think that is already true] which isn't the case for
signed md5sums. 


Reply to: