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

Re: RFC: Output files for netboot-xen flavour



On Tue, 2008-07-22 at 12:04 +0200, Bastian Blank wrote:
> On Tue, Jul 22, 2008 at 10:19:17AM +0100, Ian Campbell wrote:
> > On Tue, 2008-07-22 at 11:05 +0200, Bastian Blank wrote:
> > > On Tue, Jul 22, 2008 at 08:42:33AM +0100, Ian Campbell wrote:
> > > > +# install-installer: where to obtain the Debian Installer bits, by
> > > > +#   default these are located under install-mirror. To use a nightly
> > > > +#   snapshot: http://people.debian.org/~joeyh/d-i/images/daily/
> > > How do you check the integrity of this files?
> > If the issue is pointing people to daily snapshots in this way I'll
> > remove the example.
> 
> No, my issue with this is that it downloads things over unauthenticated
> channels, is not able to proof their authenticity and uses them without
> notice.

Hmm, that is true. Perhaps it isn't such a good idea after all.

What mechanism exists for users to (manually or otherwise) validate any
of the other images they might download? There's an MD5SUMS file but I
can't find a signature of it anywhere. If such a mechanism existed I'd
have a stab at automating it.

If there's no mechanism then the options seem to be:
      * remove this functionality and document how users can download
        themselves. Which I should do anyway, regardless of any
        automation.
      * add a print "Warning: downloading untrusted boot images... here
        are the checksums", (possibly with a press blah to continue if
        xm create can cope with that level of interaction). A bit lame
        but...

> > Much better than my version. The only reason to use the lambda was
> that
> > I was doing it for all the others and copied the pattern.
> 
> lambda was a candidate to be dropped from python 3. The same and more
> can be done with real functions and much more readable.

Are they replacing the lambda construct with anything equivalent? It can
sometimes be used to good effect, IMHO...

In the var_check_bool_with_default case, yes it can be replaced with a
direct function call which is cleaner.

For var_check_with_default the default parameter is actually used, how
would you do this without a lambda? simply by having
        def var_check_suite(name, value):
        	return var_check_with_default("lenny", name, value)
duplicated N times? Doesn't seem any cleaner to me, but if lambdas are
going away without replacement I'll have to do that.

> > > | if xm_vars.env.get('install'):
> > > |     pass
> > What is this bit for?
> 
> There is a similar test below.

Oh you just meant it as an example of how the "if not
xm_vars.env['install']:" I've used could be done right?

> Anyway, xend is not the cleanest piece of python code out there.

Indeed.

Ian.
-- 
Ian Campbell
Current Noise: Clutch - Mr. Shiny Cadillackness

The turtle lives 'twixt plated decks
Which practically conceal its sex.
I think it clever of the turtle
In such a fix to be so fertile.
		-- Ogden Nash


Reply to: