oe-setup-builddir: remove unreachable code, update comments
cover oe-setup-builddir: remove unreachable code, update comments
From: Darren Hart <[email protected]>
The following changes since commit 32a4e746273c3c7d3dd0f13b745bc0679cadaa44:
codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib.git dvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/build
Darren Hart (1):
oe-setup-builddir: remove unreachable code, update comments
scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)
PATCH 1/1 oe-setup-builddir: remove unreachable code, update comments
From: Darren Hart <[email protected]>
The script forces TEMPLATECONF to be non-empty with:
TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}This ensures that OELOCALCONF and OELAYERSCONF will be non-empty as well. Remove all the empty checks for these variables.
While this patch doesn't change behavior, all this code was unreachable, it does bring up a point of intent. It appears as though OE*CONF was intended to be configurable by the user via the environment, the code only allows for the user to set TEMPLATECONF. This means that in order to use something other than the sample default configs, the user must specify both a local.conf.sample and a bblayers.conf.sample in their TEMPLATECONF directory.
Update the comments to correctly identify the required files as local.conf.sample and bblayers.conf.sample.
--- scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)
scripts/create-pull-request +1 -1
@@ -24,7 +24,7 @@ # submission to Open Embedded and The Yocto Project, as well as to # related projects and layers. # - +set -x ODIR=pull-$$ RELATIVE_TO="master" COMMIT_ID="HEAD"
scripts/oe-setup-builddir +13 -19
@@ -37,29 +37,26 @@ fi cd "$BUILDDIR" -TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf} # -# $TEMPLATECONF can point to a directory for the template local.conf & bblayers.conf +# $TEMPLATECONF can point to a directory for the template local.conf & +# bblayers.conf. If the user hasn't specified a path, default to +# meta-yocto/conf. # -if [ "x" != "x$TEMPLATECONF" ]; then +TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf} +if ! (test -d "$TEMPLATECONF"); then + # Allow TEMPLATECONF=meta-xyz/conf as a shortcut + if [ -d "$OEROOT/$TEMPLATECONF" ]; then + TEMPLATECONF="$OEROOT/$TEMPLATECONF" + fi if ! (test -d "$TEMPLATECONF"); then - # Allow TEMPLATECONF=meta-xyz/conf as a shortcut - if [ -d "$OEROOT/$TEMPLATECONF" ]; then - TEMPLATECONF="$OEROOT/$TEMPLATECONF" - fi - if ! (test -d "$TEMPLATECONF"); then - echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf & bblayers.conf" - return - fi + echo >&2 "Error: '$TEMPLATECONF' must be a directory containing local.conf.sample & bblayers.conf.sample" + return fi - OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample" - OECORELOCALCONF="$TEMPLATECONF/local.conf.sample" fi +OECORELAYERCONF="$TEMPLATECONF/bblayers.conf.sample" +OECORELOCALCONF="$TEMPLATECONF/local.conf.sample" -if [ "x" = "x$OECORELOCALCONF" ]; then - OECORELOCALCONF="$OEROOT/meta/conf/local.conf.sample" -fi if ! (test -r "$BUILDDIR/conf/local.conf"); then cat <<EOM You had no conf/local.conf file. This configuration file has therefore been
@@ -79,9 +76,6 @@ EOM cp -f $OECORELOCALCONF $BUILDDIR/conf/local.conf fi -if [ "x" = "x$OECORELAYERCONF" ]; then - OECORELAYERCONF="$OEROOT/meta/conf/bblayers.conf.sample" -fi if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then cat <<EOM You had no conf/bblayers.conf file. The configuration file has been created for
Signature · 1 line
1.7.1
Quoted 30 lines · Darren Hart
From: Darren Hart <[email protected]>
The script forces TEMPLATECONF to be non-empty with:
TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}This ensures that OELOCALCONF and OELAYERSCONF will be non-empty as well. Remove all the empty checks for these variables.
While this patch doesn't change behavior, all this code was unreachable, it does bring up a point of intent. It appears as though OE*CONF was intended to be configurable by the user via the environment, the code only allows for the user to set TEMPLATECONF. This means that in order to use something other than the sample default configs, the user must specify both a local.conf.sample and a bblayers.conf.sample in their TEMPLATECONF directory.
Update the comments to correctly identify the required files as local.conf.sample and bblayers.conf.sample.
Signed-off-by Darren Hart <[email protected]>--- scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)scripts/create-pull-request +0
-0
scripts/create-pull-request line 27
Quoted 5 lines
scripts/create-pull-request +1
-1@@ -24,7 +24,7 @@ # submission to Open Embedded and The Yocto Project, as well as to # related projects and layers. # - +set -x
EEEK, sorry about that. I've removed this and re-pushed to the same contrib/dvhart/build branch. The only file changed is scripts/oe-setup-builddir.
Apologies.
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 10 lines · Darren Hart
From: Darren Hart<[email protected]>
The following changes since commit
32a4e746273c3c7d3dd0f13b745bc0679cadaa44:
codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contrib.gitdvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/build
Quoted 8 lines
Darren Hart (1):
oe-setup-builddir: remove unreachable code, update commentsscripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)
If this is intended for oe-core, please rebase to oe-core and resend, I had a merge issue and want to make sure I am getting the right code committed.
Sau!
Quoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 14 lines · Saul Wold
Quoted 13 lines · Darren Hart
From: Darren Hart<[email protected]>
The following changes since commit
32a4e746273c3c7d3dd0f13b745bc0679cadaa44:
codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contrib.gitdvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/buildDarren Hart (1):
oe-setup-builddir: remove unreachable code, update comments
Quoted 8 lines
Quoted 5 lines
scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)If this is intended for oe-core, please rebase to oe-core and resend, I had a merge issue and want to make sure I am getting the right code committed.
Gah, right. I saw the oe- in the script name and just had oe-core in my head. Apologies. The two scripts are slightly different in the two repositories, but both suffer from the same unreachable code problem.
Would you prefer I send two patches, one for each repository, or that I push to one or the other and let you handle the merge process as part of the regular sync up process (whatever that is).
Before I do that - are people in agreement with the approach? ie Should I be removing the unreachable code or should I instead making it usable again, reestablishing the functionality of OELOCALCONF and OELAYERSCONF?
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 27 lines · Darren Hart
Quoted 14 lines · Saul Wold
Quoted 13 lines · Darren Hart
From: Darren Hart<[email protected]>
The following changes since commit
32a4e746273c3c7d3dd0f13b745bc0679cadaa44:codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contrib.gitdvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/buildDarren Hart (1):
oe-setup-builddir: remove unreachable code, update commentsQuoted 8 lines
Quoted 5 lines
scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)If this is intended for oe-core, please rebase to oe-core and resend, I had a merge issue and want to make sure I am getting the right code committed.
Quoted 8 lines
Gah, right. I saw the oe- in the script name and just had oe-core in my head. Apologies. The two scripts are slightly different in the two repositories, but both suffer from the same unreachable code problem.
Would you prefer I send two patches, one for each repository, or that I push to one or the other and let you handle the merge process as part of the regular sync up process (whatever that is).
Typically, if something is part of oe-core than a patch request goes there and then Richard will pull it across to poky. This is a special case and I am not sure how he is handling this currently. So we need Richard to chime in on this one.
SaU!
Quoted 4 lines
Before I do that - are people in agreement with the approach? ie Should I be removing the unreachable code or should I instead making it usable again, reestablishing the functionality of OELOCALCONF and OELAYERSCONF?
Quoted 32 lines · Saul Wold
Quoted 31 lines · Darren Hart
Quoted 14 lines · Saul Wold
Quoted 13 lines · Darren Hart
From: Darren Hart<[email protected]>
The following changes since commit
32a4e746273c3c7d3dd0f13b745bc0679cadaa44:codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contrib.gitdvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/buildDarren Hart (1):
oe-setup-builddir: remove unreachable code, update commentsQuoted 8 lines
Quoted 5 lines
scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)If this is intended for oe-core, please rebase to oe-core and resend, I had a merge issue and want to make sure I am getting the right code committed.
Gah, right. I saw the oe- in the script name and just had oe-core in my head. Apologies. The two scripts are slightly different in the two repositories, but both suffer from the same unreachable code problem.
Quoted 8 lines
Quoted 4 lines
Would you prefer I send two patches, one for each repository, or that I push to one or the other and let you handle the merge process as part of the regular sync up process (whatever that is).
Typically, if something is part of oe-core than a patch request goes there and then Richard will pull it across to poky. This is a special case and I am not sure how he is handling this currently. So we need Richard to chime in on this one.
They should be the same script, that is what I've been aiming for. If they're not, we need to work out how to get them there...
Cheers,
Richard
Quoted 37 lines · Richard Purdie
Quoted 36 lines · Saul Wold
Quoted 35 lines · Darren Hart
Quoted 14 lines · Saul Wold
Quoted 13 lines · Darren Hart
From: Darren Hart<[email protected]>
The following changes since commit
32a4e746273c3c7d3dd0f13b745bc0679cadaa44:codeparser.py: fix syntax error in exception handling (2011-05-24 17:16:47 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contrib.gitdvhart/build
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/buildDarren Hart (1):
oe-setup-builddir: remove unreachable code, update commentsQuoted 8 lines
Quoted 5 lines
scripts/create-pull-request | 2 +- scripts/oe-setup-builddir | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 20 deletions(-)If this is intended for oe-core, please rebase to oe-core and resend, I had a merge issue and want to make sure I am getting the right code committed.
Gah, right. I saw the oe- in the script name and just had oe-core in my head. Apologies. The two scripts are slightly different in the two repositories, but both suffer from the same unreachable code problem.
Would you prefer I send two patches, one for each repository, or that I push to one or the other and let you handle the merge process as part of the regular sync up process (whatever that is).
Quoted 7 lines
Quoted 4 lines
Typically, if something is part of oe-core than a patch request goes there and then Richard will pull it across to poky. This is a special case and I am not sure how he is handling this currently. So we need Richard to chime in on this one.
They should be the same script, that is what I've been aiming for. If they're not, we need to work out how to get them there...
The diff is quite minimal:
-TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
+TEMPLATECONF=${TEMPLATECONF:-meta/conf}
We could have a templateconf symlink or we could modify a common conf directory for systems that incorporate oe-core. Failing that we would need a yocto specific wrapper to the setup scripts to specify our preferred directory. I will send the patch as is based on oe and ask that it be merged to poky as well.
Quoted 10 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel