All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: tom.zanussi@intel.com
Cc: yocto@yoctoproject.org
Subject: Re: [PATCH 8/8] yocto-kernel: new script
Date: Fri, 02 Mar 2012 09:23:44 -0800	[thread overview]
Message-ID: <4F510220.80303@linux.intel.com> (raw)
In-Reply-To: <8ef1fb35b82a8be34b16e9e4d655640486384822.1330663414.git.tom.zanussi@intel.com>



On 03/01/2012 11:01 PM, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
> 
> Implementation of the 'yocto-kernel' command-line tool, for modifying
> the kernel portion of a Yocto BSP.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> ---
>  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 <tom.zanussi@intel.com>

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...

Tom, this is all really great work. It's well-formed python, properly
documented both in comments and user visible help. Very nice.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


  reply	other threads:[~2012-03-02 17:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02  7:01 [PATCH 0/8] Yocto BSP tools tom.zanussi
2012-03-02  7:01 ` [PATCH 1/8] yocto-bsp: add BSP template files tom.zanussi
2012-03-02 16:35   ` Darren Hart
2012-03-02 17:19     ` Tom Zanussi
2012-03-02  7:01 ` [PATCH 2/8] yocto-bsp-tools: add bsp library tom.zanussi
2012-03-02 16:41   ` Darren Hart
2012-03-02  7:01 ` [PATCH 3/8] yocto-bsp: add templating engine tom.zanussi
2012-03-02 16:57   ` Darren Hart
2012-03-02 17:22     ` Tom Zanussi
2012-03-02  7:01 ` [PATCH 4/8] yocto-bsp: add kernel interface tom.zanussi
2012-03-02 17:11   ` Darren Hart
2012-03-02 17:34     ` Tom Zanussi
2012-03-02  7:01 ` [PATCH 5/8] yocto-bsp-tools: add help/usage tom.zanussi
2012-03-02 17:17   ` Darren Hart
2012-03-02  7:01 ` [PATCH 6/8] yocto-bsp: add some useful constants tom.zanussi
2012-03-02 17:18   ` Darren Hart
2012-03-02  7:01 ` [PATCH 7/8] yocto-bsp: new script tom.zanussi
2012-03-02 17:20   ` Darren Hart
2012-03-02  7:01 ` [PATCH 8/8] yocto-kernel: " tom.zanussi
2012-03-02 17:23   ` Darren Hart [this message]
2012-03-02 17:27     ` Tom Zanussi
2012-03-02 16:24 ` [PATCH 0/8] Yocto BSP tools Darren Hart
2012-03-02 17:02   ` Tom Zanussi
2012-03-02 17:15     ` Darren Hart
  -- strict thread matches above, loose matches on Subject: below --
2012-03-17  5:30 [PATCH 1/8] yocto-bsp: add BSP template files tom.zanussi
2012-03-17  5:30 ` [PATCH 0/8] Yocto BSP tools, version 2 tom.zanussi
2012-03-17  5:30   ` [PATCH 8/8] yocto-kernel: new script tom.zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F510220.80303@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=tom.zanussi@intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.