* [PATCH] bitbake: Allow arguments in FAKEROOTCMD
@ 2019-02-07 16:56 Joshua Watt
2019-02-07 22:00 ` Christopher Larson
2019-02-14 21:36 ` [PATCH v2] " Joshua Watt
0 siblings, 2 replies; 3+ messages in thread
From: Joshua Watt @ 2019-02-07 16:56 UTC (permalink / raw)
To: bitbake-devel
Changes FAKEROOTCMD so that it can accept additional arguments to pass
to the fakeroot implementation instead of being treated as a simple
command
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
bitbake/lib/bb/runqueue.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6002ccf06a8..56b8319528c 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1221,12 +1221,12 @@ class RunQueue:
if fakeroot:
magic = magic + "beef"
mcdata = self.cooker.databuilder.mcdata[mc]
- fakerootcmd = mcdata.getVar("FAKEROOTCMD")
+ fakerootcmd = mcdata.getVar("FAKEROOTCMD").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)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bitbake: Allow arguments in FAKEROOTCMD
2019-02-07 16:56 [PATCH] bitbake: Allow arguments in FAKEROOTCMD Joshua Watt
@ 2019-02-07 22:00 ` Christopher Larson
2019-02-14 21:36 ` [PATCH v2] " Joshua Watt
1 sibling, 0 replies; 3+ messages in thread
From: Christopher Larson @ 2019-02-07 22:00 UTC (permalink / raw)
To: Joshua Watt; +Cc: bitbake-devel
[-- Attachment #1: Type: text/plain, Size: 2010 bytes --]
This should really use shlex.split rather than str.split to handle quoting,
etc.
On Thu, Feb 7, 2019 at 9:56 AM Joshua Watt <jpewhacker@gmail.com> wrote:
> Changes FAKEROOTCMD so that it can accept additional arguments to pass
> to the fakeroot implementation instead of being treated as a simple
> command
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> bitbake/lib/bb/runqueue.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index 6002ccf06a8..56b8319528c 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -1221,12 +1221,12 @@ class RunQueue:
> if fakeroot:
> magic = magic + "beef"
> mcdata = self.cooker.databuilder.mcdata[mc]
> - fakerootcmd = mcdata.getVar("FAKEROOTCMD")
> + fakerootcmd = mcdata.getVar("FAKEROOTCMD").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)
> --
> 2.20.1
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
[-- Attachment #2: Type: text/html, Size: 2949 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] bitbake: Allow arguments in FAKEROOTCMD
2019-02-07 16:56 [PATCH] bitbake: Allow arguments in FAKEROOTCMD Joshua Watt
2019-02-07 22:00 ` Christopher Larson
@ 2019-02-14 21:36 ` Joshua Watt
1 sibling, 0 replies; 3+ messages in thread
From: Joshua Watt @ 2019-02-14 21:36 UTC (permalink / raw)
To: bitbake-devel
Changes FAKEROOTCMD so that it can accept additional arguments to pass
to the fakeroot implementation instead of being treated as a simple
command
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
bitbake/lib/bb/runqueue.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6002ccf06a8..9b2e69e543b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -37,6 +37,7 @@ from bb import monitordisk
import subprocess
import pickle
from multiprocessing import Process
+import shlex
bblogger = logging.getLogger("BitBake")
logger = logging.getLogger("BitBake.RunQueue")
@@ -1221,12 +1222,12 @@ class RunQueue:
if fakeroot:
magic = magic + "beef"
mcdata = self.cooker.databuilder.mcdata[mc]
- fakerootcmd = mcdata.getVar("FAKEROOTCMD")
+ fakerootcmd = shlex.split(mcdata.getVar("FAKEROOTCMD"))
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)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-14 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07 16:56 [PATCH] bitbake: Allow arguments in FAKEROOTCMD Joshua Watt
2019-02-07 22:00 ` Christopher Larson
2019-02-14 21:36 ` [PATCH v2] " Joshua Watt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.