Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Jussi Kukkonen <jussi.kukkonen@intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 01/11] devtool: make 2 functions public
Date: Wed, 2 Sep 2015 16:54:45 +0300	[thread overview]
Message-ID: <20150902135445.GA5916@linux.intel.com> (raw)
In-Reply-To: <CAHiDW_EA-=tfahxA7_KXhfmWmOMBjES4_WCTOns3O25odMJTZg@mail.gmail.com>

On Wed, Sep 02, 2015 at 02:16:58PM +0300, Jussi Kukkonen wrote:
> On 30 August 2015 at 19:08, Ed Bartosh <ed.bartosh@linux.intel.com> wrote:
> >
> > Moved standard.py:_parse_recipe -> __init__.py:parse_recipe and
> >       standard.py:_get_recipe_file ->  __init__.py:get_recipe_file
> > to be able to call them from other modules.
> 
> Hi Ed,
> 
> Can you take a look if the failures in
> https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/173/steps/Running%20oe-selftest/logs/stdio
> are related to this patch (there's lots of "NameError: global name
> '_parse_recipe' is not defined")
> 

The autobuilder log looks very strange to me. I don't see any mentioning
of _parse_recipe in standard.py on master. Moreover, there is no
_prep_extract_operation function mentioned in traceback.

I've just run failed test and it passed without any issues.


It looks like autobuilder messed the code from some old branch and tests
from master.

Regards,
Ed

> 
> >
> > Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> > ---
> >  scripts/lib/devtool/__init__.py | 27 +++++++++++++++++++++++++++
> >  scripts/lib/devtool/standard.py | 36 ++++--------------------------------
> >  2 files changed, 31 insertions(+), 32 deletions(-)
> >
> > diff --git a/scripts/lib/devtool/__init__.py
> b/scripts/lib/devtool/__init__.py
> > index 1747fff..97ac6ae 100644
> > --- a/scripts/lib/devtool/__init__.py
> > +++ b/scripts/lib/devtool/__init__.py
> > @@ -116,3 +116,30 @@ def add_md5(config, recipename, filename):
> >      md5 = bb.utils.md5_file(filename)
> >      with open(os.path.join(config.workspace_path, '.devtool_md5'), 'a')
> as f:
> >          f.write('%s|%s|%s\n' % (recipename, os.path.relpath(filename,
> config.workspace_path), md5))
> > +
> > +def get_recipe_file(cooker, pn):
> > +    """Find recipe file corresponding a package name"""
> > +    import oe.recipeutils
> > +    recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
> > +    if not recipefile:
> > +        skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
> > +        if skipreasons:
> > +            logger.error('\n'.join(skipreasons))
> > +        else:
> > +            logger.error("Unable to find any recipe file matching %s" %
> pn)
> > +    return recipefile
> > +
> > +def parse_recipe(config, tinfoil, pn, appends):
> > +    """Parse recipe of a package"""
> > +    import oe.recipeutils
> > +    recipefile = get_recipe_file(tinfoil.cooker, pn)
> > +    if not recipefile:
> > +        # Error already logged
> > +        return None
> > +    if appends:
> > +        append_files =
> tinfoil.cooker.collection.get_file_appends(recipefile)
> > +        # Filter out appends from the workspace
> > +        append_files = [path for path in append_files if
> > +                        not path.startswith(config.workspace_path)]
> > +    return oe.recipeutils.parse_recipe(recipefile, append_files,
> > +                                       tinfoil.config_data)
> > diff --git a/scripts/lib/devtool/standard.py
> b/scripts/lib/devtool/standard.py
> > index 4aa6ebd..97c45d9 100644
> > --- a/scripts/lib/devtool/standard.py
> > +++ b/scripts/lib/devtool/standard.py
> > @@ -26,7 +26,7 @@ import argparse
> >  import scriptutils
> >  import errno
> >  from devtool import exec_build_env_command, setup_tinfoil, DevtoolError
> > -from devtool import add_md5
> > +from devtool import add_md5, parse_recipe
> >
> >  logger = logging.getLogger('devtool')
> >
> > @@ -157,34 +157,6 @@ def _check_compatible_recipe(pn, d):
> >                             "from working. You will need to disable this "
> >                             "first." % pn)
> >
> > -def _get_recipe_file(cooker, pn):
> > -    """Find recipe file corresponding a package name"""
> > -    import oe.recipeutils
> > -    recipefile = oe.recipeutils.pn_to_recipe(cooker, pn)
> > -    if not recipefile:
> > -        skipreasons = oe.recipeutils.get_unavailable_reasons(cooker, pn)
> > -        if skipreasons:
> > -            logger.error('\n'.join(skipreasons))
> > -        else:
> > -            logger.error("Unable to find any recipe file matching %s" %
> pn)
> > -    return recipefile
> > -
> > -def _parse_recipe(config, tinfoil, pn, appends):
> > -    """Parse recipe of a package"""
> > -    import oe.recipeutils
> > -    recipefile = _get_recipe_file(tinfoil.cooker, pn)
> > -    if not recipefile:
> > -        # Error already logged
> > -        return None
> > -    if appends:
> > -        append_files =
> tinfoil.cooker.collection.get_file_appends(recipefile)
> > -        # Filter out appends from the workspace
> > -        append_files = [path for path in append_files if
> > -                        not path.startswith(config.workspace_path)]
> > -    return oe.recipeutils.parse_recipe(recipefile, append_files,
> > -                                       tinfoil.config_data)
> > -
> > -
> >  def _ls_tree(directory):
> >      """Recursive listing of files in a directory"""
> >      ret = []
> > @@ -200,7 +172,7 @@ def extract(args, config, basepath, workspace):
> >
> >      tinfoil = setup_tinfoil()
> >
> > -    rd = _parse_recipe(config, tinfoil, args.recipename, True)
> > +    rd = parse_recipe(config, tinfoil, args.recipename, True)
> >      if not rd:
> >          return 1
> >
> > @@ -420,7 +392,7 @@ def modify(args, config, basepath, workspace):
> >
> >      tinfoil = setup_tinfoil()
> >
> > -    rd = _parse_recipe(config, tinfoil, args.recipename, True)
> > +    rd = parse_recipe(config, tinfoil, args.recipename, True)
> >      if not rd:
> >          return 1
> >      recipefile = rd.getVar('FILE', True)
> > @@ -762,7 +734,7 @@ def update_recipe(args, config, basepath, workspace):
> >
> >      tinfoil = setup_tinfoil()
> >
> > -    rd = _parse_recipe(config, tinfoil, args.recipename, True)
> > +    rd = parse_recipe(config, tinfoil, args.recipename, True)
> >      if not rd:
> >          return 1
> >
> > --
> > 2.1.4
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2015-09-02 13:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 16:08 [PATCH 00/11] Improve build-image plugin Ed Bartosh
2015-08-30 16:08 ` [PATCH 01/11] devtool: make 2 functions public Ed Bartosh
2015-09-02 11:16   ` Jussi Kukkonen
2015-09-02 13:54     ` Ed Bartosh [this message]
2015-09-02 15:22       ` Richard Purdie
2015-08-30 16:08 ` [PATCH 02/11] devtool: build-image: stop using add_md5 Ed Bartosh
2015-08-30 16:08 ` [PATCH 03/11] Revert "devtool: make add_md5 a public API" Ed Bartosh
2015-08-30 16:08 ` [PATCH 04/11] devtool: build-image: rename LOG -> logger Ed Bartosh
2015-08-30 16:08 ` [PATCH 05/11] devtool: build-image: improve help and description Ed Bartosh
2015-08-30 16:08 ` [PATCH 06/11] devtool: build-image: filter out recipes Ed Bartosh
2015-08-30 16:08 ` [PATCH 07/11] devtool: build-image: generate notification callback Ed Bartosh
2015-08-30 16:08 ` [PATCH 08/11] devtool: build-image: add extra logging Ed Bartosh
2015-08-30 16:08 ` [PATCH 09/11] devtool: build-image: remove <image>.bbappend Ed Bartosh
2015-08-30 16:08 ` [PATCH 10/11] devtool: build-image: add comments Ed Bartosh
2015-08-30 16:08 ` [PATCH 11/11] oe-selftest: test devtool build-image plugin Ed Bartosh

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=20150902135445.GA5916@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=jussi.kukkonen@intel.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox