On Fri, 2012-03-02 at 09:23 -0800, Darren Hart wrote: > > On 03/01/2012 11:01 PM, [email protected] wrote: > > From: Tom Zanussi <[email protected]> > > > > Implementation of the 'yocto-kernel' command-line tool, for modifying > > the kernel portion of a Yocto BSP. > > > > Signed-off-by: Tom Zanussi <[email protected]> > > --- > > scripts/yocto-kernel | 219 > > ++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 219 insertions(+), 0 deletions(-) > > create mode 100755 scripts/yocto-kernel > > > > diff --git a/scripts/yocto-kernel b/scripts/yocto-kernel > > new file mode 100755 > > index 0000000..97a7a7c > > --- /dev/null > > +++ b/scripts/yocto-kernel > > @@ -0,0 +1,219 @@ > > +#!/usr/bin/env python > > +# ex:ts=4:sw=4:sts=4:et > > +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- > > +# > > +# Copyright 2012 Intel Corporation > > +# Authored-by: Tom Zanussi <[email protected]> > > same comment... > > > +# > > +# This program is free software; you can redistribute it and/or modify > > +# it under the terms of the GNU General Public License version 2 as > > +# published by the Free Software Foundation. > > +# > > +# This program is distributed in the hope that it will be useful, > > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > +# GNU General Public License for more details. > > +# > > +# You should have received a copy of the GNU General Public License along > > +# with this program; if not, write to the Free Software Foundation, Inc., > > +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > > + > > +__version__ = "0.1.0" > > + > > +import os > > +import sys > > +import optparse > > +import logging > > + > > +scripts_path = > > os.path.abspath(os.path.dirname(os.path.abspath(sys.argv[0]))) > > +lib_path = scripts_path + '/lib' > > +sys.path = sys.path + [lib_path] > > + > > +from bsp.help import * > > +from bsp.kernel import * > > + > > + > > +def yocto_kernel_config_list_subcommand(args, usage_str): > > + """ > > + Command-line handling for listing BSP config options. The > > + real work is done by bsp.kernel.yocto_kernel_config_list(). > > + """ > > + logging.debug("yocto_kernel_config_list_subcommand") > > + > > + parser = optparse.OptionParser(usage = usage_str) > > + > > + (options, args) = parser.parse_args(args) > > + > > + if len(args) != 1: > > + logging.error("Wrong number of arguments, exiting\n") > > + parser.print_help() > > + exit(1) > > > Same comment on exit here as 7/8. Maybe there is a subtle difference > that I'm missing? Same throughout the other subcommands... >
No, those are basically typos that work. I think they should all be sys.exit. Thanks for noticing and pointing it out. > Tom, this is all really great work. It's well-formed python, properly > documented both in comments and user visible help. Very nice. > Thanks, I appreciate your comments. Tom _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
