Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Stephano Cetola <stephano.cetola@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] devtool: modify command fails to ignore source files
Date: Mon, 03 Oct 2016 11:40:04 +1300	[thread overview]
Message-ID: <1551142.S3eIX641iV@peggleto-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20161002205506.124239-1-stephano.cetola@linux.intel.com>

Hi Stephano,

Thanks for looking into this, a few things:

On Sun, 02 Oct 2016 13:55:06 Stephano Cetola wrote:
> With recent changes to recipeutils, the list of local files returned
> by get_recipe_local_files could possibly include source files. This
> only happens when the recipe contains a SRC_URI using subdir= to put
> files in the source tree. These files should be ignored when
> populating the list of local files for oe-local-files directory.

You should include "Fixes [YOCTO #10326]." here. Also, if a patch fixes a 
regression that we've been able to track down, as part of the commit message I 
like to mention which revision caused it, and in this case it would be 
OE-Core revision 9069fef5dad5a873c8a8f720f7bcbc7625556309.

> Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
> ---
>  scripts/lib/devtool/standard.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/devtool/standard.py
> b/scripts/lib/devtool/standard.py index 8319145..c7a5712 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -568,8 +568,12 @@ def _extract_source(srctree, keep_temp, devbranch,
> sync, d): recipe_patches = [os.path.basename(patch) for patch in
>                            oe.recipeutils.get_recipe_patches(crd)]
>          local_files = oe.recipeutils.get_recipe_local_files(crd)
> +
> +        # Ignore local files with subdir={BP}
> +        srcdirname = os.path.basename(os.path.normpath(srcsubdir))
>          local_files = [fname for fname in local_files if
> -                       os.path.exists(os.path.join(workdir, fname))]
> +                       os.path.exists(os.path.join(workdir, fname)) and
> +                       srcdirname not in fname]

This seems likely to false-trigger quite easily - you're only looking for the 
basename and whether it appears anywhere in the path rather than at the start. 
I'd suggest getting the absolute path to the source directory and check if it 
starts with that (I think that's how I dealt with that elsewhere).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


  reply	other threads:[~2016-10-02 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 20:55 [PATCH] devtool: modify command fails to ignore source files Stephano Cetola
2016-10-02 22:40 ` Paul Eggleton [this message]
2016-10-02 23:54   ` Stephano Cetola

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=1551142.S3eIX641iV@peggleto-mobl.ger.corp.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stephano.cetola@linux.intel.com \
    /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