layerindex: don't use shell=True when cloning
PATCH 1/2 layerindex: don't use shell=True when cloning
Signed-off-by Ross Burton <[email protected]>
--- bitbake/lib/bblayers/layerindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bblayers/layerindex.py +1 -1
@@ -28,7 +28,7 @@ class LayerIndexPlugin(ActionPlugin): layerdir = os.path.join(repodir, subdir) if not os.path.exists(repodir): if fetch_layer: - result = subprocess.call('git clone %s %s' % (url, repodir), shell = True) + result = subprocess.call(['git', 'clone', url, repodir]) if result: logger.error("Failed to download %s" % url) return None, None, None
Signature · 1 line
2.11.0
PATCH 2/2 fetch: don't use shell=True when listing ar files
Signed-off-by Ross Burton <[email protected]>
--- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/__init__.py +1 -1
@@ -1469,7 +1469,7 @@ class FetchMethod(object): else: cmd = 'rpm2cpio.sh %s | cpio -id' % (file) elif file.endswith('.deb') or file.endswith('.ipk'): - output = subprocess.check_output('ar -t %s' % file, preexec_fn=subprocess_setup, shell=True) + output = subprocess.check_output(['ar', '-t', file], preexec_fn=subprocess_setup) datafile = None if output: for line in output.decode().splitlines():
Signature · 1 line
2.11.0