Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: question about FILE_DIRNAME versus THISDIR when setting FILESPATH
Date: Mon, 11 Nov 2013 15:47:21 +0000	[thread overview]
Message-ID: <27143722.kSNEIjm3EO@helios> (raw)
In-Reply-To: <alpine.DEB.2.02.1311101257290.3090@oneiric>

Hi Robert,

On Sunday 10 November 2013 13:02:32 Robert P. J. Day wrote:
>   probably a simple answer to this, but in examining the way FILESPATH
> is created, i notice that, in .bb recipe files, the general form of
> setting FILESPATH always seems to involve the use of the FILE_DIRNAME
> variable, such as in the default value from base.bbclass:
> 
> FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}",
> "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
> 
>   however, when one is extending FILESPATH in .bbappend files, the
> variable used to refer to the current directory is always THISDIR. but
> it's not clear what the distinction is.
> 
>   i'm using "bb show" and, when i'm referring to the value of
> FILESPATH for an overlayed recipe, both FILE_DIRNAME and THISDIR seem
> to properly refer to the directory for the bbappend file.
> 
>   can someone clarify the proper usage of these variables? in
> particular, why it's important for .bb files to use FILE_DIRNAME but
> .bbappend files to use THISDIR? thanks.

These variables are set in pretty much the same way; the only difference is 
that FILE_DIRNAME doesn't expand FILE before running it through 
os.path.dirname(); I'm not sure if that is deliberate or not. In practice I 
doubt it makes any difference since FILE is set to a full path by BitBake, 
although as you note a convention has been established of using THISDIR in 
bbappends and FILE_DIRNAME elsewhere.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


      reply	other threads:[~2013-11-11 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 18:02 question about FILE_DIRNAME versus THISDIR when setting FILESPATH Robert P. J. Day
2013-11-11 15:47 ` Paul Eggleton [this message]

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=27143722.kSNEIjm3EO@helios \
    --to=paul.eggleton@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rpjday@crashcourse.ca \
    /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