[bitbake-devel] [PATCH] Add a variable to pass flags to fakeroot (pseudo)
Mark Hatle
mark.hatle at windriver.com
Thu Dec 6 19:08:10 UTC 2018
(No objection to this patch......)
Would anyone be interested in a comment that changes aware from 'fakeroot' and
to 'pseudo'?
Just curious, as I don't actually think 'fakeroot' would work anymore. (Ya, I
know there would be compatibility issues, but those could likely be addressed by
variables and/or 'or' statements.)
Just wondering if that kind of a change/cleanup makes sense or not just thinking
of bitbake.
--Mark
On 12/6/18 12:55 PM, Joshua Watt wrote:
> It is occasionally useful to pass additional flags to fakeroot (pseudo)
> either for debugging or for behavioral system changes. Add a variable
> called "FAKEROOTARGS" that can be used for this purpose.
>
> Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
> ---
> bitbake/lib/bb/build.py | 2 +-
> bitbake/lib/bb/runqueue.py | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
> index 4631abdde57..20350319bf0 100644
> --- a/bitbake/lib/bb/build.py
> +++ b/bitbake/lib/bb/build.py
> @@ -371,7 +371,7 @@ exit $ret
> if d.getVarFlag(func, 'fakeroot', False):
> fakerootcmd = d.getVar('FAKEROOT')
> if fakerootcmd:
> - cmd = [fakerootcmd, runfile]
> + cmd = [fakerootcmd] + (d.getVar('FAKEROOTARGS') or '').split() + ['--', runfile]
>
> if bb.msg.loggerDefaultVerbose:
> logfile = LogTee(logger, sys.stdout)
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index f2e52cf758c..de04ccfcb91 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -1175,12 +1175,12 @@ class RunQueue:
> if fakeroot:
> magic = magic + "beef"
> mcdata = self.cooker.databuilder.mcdata[mc]
> - fakerootcmd = mcdata.getVar("FAKEROOTCMD")
> + fakerootcmd = [mcdata.getVar("FAKEROOTCMD")] + (mcdata.getVar("FAKEROOTARGS") or '').split() + ['--']
> fakerootenv = (mcdata.getVar("FAKEROOTBASEENV") or "").split()
> env = os.environ.copy()
> for key, value in (var.split('=') for var in fakerootenv):
> env[key] = value
> - worker = subprocess.Popen([fakerootcmd, "bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env)
> + worker = subprocess.Popen(fakerootcmd + ["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE, env=env)
> else:
> worker = subprocess.Popen(["bitbake-worker", magic], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
> bb.utils.nonblockingfd(worker.stdout)
>
More information about the bitbake-devel
mailing list