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

Re: Bits from the CD team: plans for debian-cd v3.0

On Wed, Jul 13, 2005 at 09:31:26AM +0200, Raphael Hertzog wrote:
>Le mardi 12 juillet 2005 ? 19:08 +0200, Robert Lemmen a ?crit :
>> >     [...] once the tree gets to within a small
>> >     margin of the target, we can start running mkisofs -print-size to
>> >     check exactly how large the resulting image would be. It will even
>> is this really necessary? can't we somehow determine how much will fit
>> on the cd without doing this? 
>To calculate the exact size of the image, you must have knowledge of
>ISO-9660 and mkisofs has this knowledge. So it looks logical to rely on
>it rather than reinvent the wheel.
>The image is by definition larger than the sum of the file size. You
>have space lost for the filesystem meta-data and also because of the way
>how data is stored (fixed-size blocks, ...).

Yes, exactly. We can do quick-and-dirty size estimation as we copy
files in, but the only way to know _exactly_ how big the image will be
is to use mkisofs. Hence the "within a small margin" above. I'm hoping
we can guesstimate sizes reasonably well up to ~95% of the target
size, and go for the slower option from there:

  * Dump stanzas into the Packages/Source file and compress them
  * Update Release file
  * Fill in any last files
  * Run mkisofs --print-size

The plan will then be to fill the discs as much as possible. In fact,
the best way might even be to go 1 package/source file too far, then
roll back.

Steve McIntyre, Cambridge, UK.                                steve@einval.com
You raise the blade, you make the change... You re-arrange me 'til I'm sane...

Attachment: signature.asc
Description: Digital signature

Reply to: