Skip to contentSkip to conversation

#yocto How to access a varibale exported by the shell in a recepie

DISCUSSION [email protected] 2 participants 2 messages Jun 17, 2020

lore
Share & tools
lore
#0 lore raw

0

I have a yocto recepie file. However I want to set a value to the variable , by exporting a variable

For example I modified I added a variable in oe-init-build-env, ( whihc calls 'svn_util')

export REPO_BRANCH_ROOT=${REPO_BRANCH_ROOT}

The REPO_BRANCH_ROOT variable is set by running a utility 'svn_util', by looking at by current branch.

Now in my recepie.bb file SRC_URI = "\ svn://${REPO_ROOT_NO_URI}/${REPO_BRANCH_ROOT}/sample module=mymodule;protocol=protocol=http;rev=HEAD \ "

However do_fetch: fails as follows. Fetcher failure for URL: 'svn://${REPO_ROOT_NO_URI}/${REPO_BRANCH_ROOT}/sample;module=mymodule;protocol=http;rev=HEAD'. Unable to fetch URL from any source.

How do I make .bb file to be aware of my current branch and reposotory uri . I do not want to hard code it in the bb file, or local.conf file . Becuase if the .bb file is checked in to a different branch it should work correctly across all branch.

Or to rephrase the question , How a shell exported variable be accessed in the recepie file.

#1 lore raw

https://www.yoctoproject.org/docs/3.1/bitbake-user-manual/bitbake-user-manual.html#var-bb-BB_ENV_EXTRAWHITE

Quoted 19 lines · jjvazha via lists.yoctoproject.org

0

I have a yocto recepie file. However I want to set a value to the variable , by exporting a variable

For example I modified I added a variable in oe-init-build-env, ( whihc calls 'svn_util')

export REPO_BRANCH_ROOT=${REPO_BRANCH_ROOT}

The REPO_BRANCH_ROOT variable is set by running a utility 'svn_util', by looking at by current branch.

Now in my recepie.bb file SRC_URI = "\ svn://${REPO_ROOT_NO_URI}/${REPO_BRANCH_ROOT}/sample module=mymodule;protocol=protocol=http;rev=HEAD \ "

However do_fetch: fails as follows. Fetcher failure for URL: 'svn://${REPO_ROOT_NO_URI}/${REPO_BRANCH_ROOT}/sample;module=mymodule;protocol=http;rev=HEAD'. Unable to fetch URL from any source.

How do I make .bb file to be aware of my current branch and reposotory uri . I do not want to hard code it in the bb file, or local.conf file . Becuase if the .bb file is checked in to a different branch it should work correctly across all branch.

Or to rephrase the question , How a shell exported variable be accessed in the recepie file.