From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: a few questions on the proper use of TEMPLATECONF
Date: Mon, 4 Aug 2014 06:54:15 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.11.1408040630210.6237@localhost> (raw)
first time perusing all that templateconf stuff, so some admittedly
simple questions.
i'm looking at oe-setup-builddir, which is where the initialization
of the new build dir is done, so let's start at the top:
if [ -z "$BUILDDIR" ]; then
echo >&2 "Error: The build directory (BUILDDIR) must be set!"
exit 1
fi
mkdir -p $BUILDDIR/conf
if [ ! -d "$BUILDDIR" ]; then
echo >&2 "Error: The builddir ($BUILDDIR) does not exist!"
exit 1
fi
if [ ! -w "$BUILDDIR" ]; then
echo >&2 "Error: Cannot write to $BUILDDIR, perhaps try sourcing with a writable path? i.e. . oe-init-build-env ~/my-build"
exit 1
fi
cd "$BUILDDIR"
so, at that point, i have either a new project, or i've simply reset
my working environment into an existing project. so far, so good. the
next few lines are just a bit puzzling:
if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then
TEMPLATECONF=$(cat $BUILDDIR/conf/templateconf.cfg)
fi
. $OEROOT/.templateconf
could that not have been written with an "else" clause?
if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then
TEMPLATECONF=$(cat $BUILDDIR/conf/templateconf.cfg)
else
. $OEROOT/.templateconf
fi
after all, if you have an existing templateconf.cfg and use that to
set TEMPLATECONF, what is the point of subsequently sourcing the
OEROOT .templateconf file, which will simply realize it's been set and
do nothing? (yes, i realize it doesn't hurt, but i firmly believe in
not invoking code that clearly has no value -- it's just confusing for
people who want to RTFS. :-)
next, i assume that while it's natural to put overriding conf files
in a layer/conf file, they can be placed anywhere, correct?
also, there appear to be a few typos in that script. here:
echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf & bblayers.conf"
i assume those names should be local.conf.sample and
bblayers.conf.sample, yes? and a couple other minor typos in comments.
thoughts?
rday
p.s. oh, one more observation. at the end of oe-setup-builddir:
if [ -z "$OECORENOTESCONF" ]; then
OECORENOTESCONF="$OEROOT/meta/conf/conf-notes.txt"
fi
given that poky uses "meta-yocto/conf" as the default basis for the
sample files, why is this code explicitly using "meta/conf"? i notice
that there are two files with that name under the poky checkout:
[poky]$ find . -name conf-notes.txt
./meta-yocto/conf/conf-notes.txt
./meta/conf/conf-notes.txt
$
do you really want to mixing those references? yes, the files appear
to be identical, but it's still potentially confusing.
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
next reply other threads:[~2014-08-04 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 10:54 Robert P. J. Day [this message]
2014-08-04 11:19 ` a few questions on the proper use of TEMPLATECONF Robert P. J. Day
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=alpine.LFD.2.11.1408040630210.6237@localhost \
--to=rpjday@crashcourse.ca \
--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