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

Re: [et-mgmt-tools] [patch 1/8] Add Installer and re-factor existing code into DistroInstaller



On Wed, May 02, 2007 at 01:15:43PM +0100, Mark McLoughlin wrote:
> +    # kernel + initrd pair to use for installing as opposed to using a location
> +    def get_boot(self):
> +        return self._boot
> +    def set_boot(self, val):
> +        if type(val) == tuple:
> +            if len(val) != 2:
> +                raise ValueError, "Must pass both a kernel and initrd"
> +            (k, i) = val
> +            self._boot = {"kernel": k, "initrd": i}
> +        elif type(val) == dict:
> +            if not val.has_key("kernel") or not val.has_key("initrd"):
> +                raise ValueError, "Must pass both a kernel and initrd"
> +            self._boot = val
> +        elif type(val) == list:
> +            if len(val) != 2:
> +                raise ValueError, "Must pass both a kernel and initrd"
> +            self._boot = {"kernel": val[0], "initrd": val[1]}
> +    boot = property(get_boot, set_boot)


I realize you're just copying the existing code here which enforced use
of both kernel + initrd, but it occurs to me forcing initrd is not a
good idea. AFAICK, not every OS needs an initrd, so it might be worthwhile
making initrd optional. There's a bunch of other places in the code which'd
need cleaning up to deal with this.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


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