On Mon, Aug 16, 2010 at 7:56 PM, Jasper Hartline
<[email protected]> wrote:
> In response to Jan Kratochvil's shell script I have attached a python
> script which replicates
> what she does in the bash shell script.
>
> There is also a patch, which fixes up some regex/match in livecd-iso-to-disk
> and another section which assumes our loop devices have extra numbered
> partitions.
>
> If you guys want to help beat mkbiarch.py Python script into shape maybe
> we gan get it into the tools for livecd-tools.
>
> The way you use it, is:
> mkbiarch.py <x86 ISO image> <x64 ISO image> <Target Multi Arch Image name>

I checked out the mkbiarch script and it looks good! I don't have the
requisite ISO's on hand to test it though.

I'm trying to brush up on my Python after a hiatus so pardon if my
comments don't make sense.

It's probably overkill but I know there's the optparse module for
passing arguments and options. Not really necessary since the script
requires exactly 3 arguments but it would add somewhat automagically
things like --help and --version.

Is there any difference between os.stat().st_size and os.path.getsize()?
Do we care if one of the argument references is a symbolic link? I
think it's just personal preference in coding style but I tend to use
more high level functions like os.path.isfile() versus os.stat()

It looks like as this is a largely procedural style script that there
is some things done twice (once for the 32bit image and once for the
64bit image) which could be generalized in a function.

Richard

I think it could use quite a bit of comments because it took me a
while to figure out what did what and I still don't see where the two
images are combined but then again I'm not familiar with losetup.
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to