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

Re: Wanted: partitioner recipe calculator



On Thu, May 12, 2005 at 12:12:26AM +0200, W. Borgert wrote:
> Quoting Anton Zinoviev <anton@lml.bas.bg>:
> > However I have just described in
> > debian-installer/installer/doc/devel/partman-auto-recipe.txt
> > how partman-auto computes the partition sizes.
> 
> The new description is very good and easy to understand.  Thanks!
> When writing a new recipe, it's nice to try the recipe without
> really having to eat the soup.  I hacked a little Python script,
> that generates an HTML page visualising the effect of a recipe
> on different combinations of hard disk size and memory.  Maybe
> it's of use to some users of d-i.  See attachment, have fun.

Today I did play with it.
The parser revealed some errors my recipe,
so it prevented some reboots, thank you!


More comment follows ....

> Cheers, WB

> #!/usr/bin/env python
> # Copyright 2005 W. Borgert, distribute under GNU General Public License v2
> # Create HTML visualisation of hard-disk partitioning recipe
> 
> import os
> import sys
> import gdchart
> import pyparsing as pp
 <snip/>
>     pie = gdchart.Pie()

 for some reason it does not work with python 2.3.5

>     pie.bg_color = "white"
>     pie.color = map(
  <snip/>
>         apply(pie.setData, [p.min for p in recipe.partitions])
>         pie.setLabels([("%d %s" % (p.min/1024., p.use))[:11]

 If I recall correct, then does partman "1000"   ( not "1024")

>                        for p in recipe.partitions])
>         pie.draw(filename)
>     print "</body></html>"

The script has now a "homepage"
 at http://wiki.debian.org/DebianInstallerPartmanPrc


Cheers
GSt



Reply to: