* question about FILE_DIRNAME versus THISDIR when setting FILESPATH
@ 2013-11-10 18:02 Robert P. J. Day
2013-11-11 15:47 ` Paul Eggleton
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2013-11-10 18:02 UTC (permalink / raw)
To: OE Core mailing list
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.
rday
p.s. i'll have a more involved FILESPATH question shortly.
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: question about FILE_DIRNAME versus THISDIR when setting FILESPATH
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
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2013-11-11 15:47 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: openembedded-core
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-11 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox