summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2020-09-07 18:43:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 12:51:24 +0100
commit98905dd827f1e9c9a3e355827f347385dc81cad7 (patch)
tree6b35345530b5088d4a090a20586c174bf9c7f498
parent15531ddeb06a098db52de770f0fd2ae5e3eb517c (diff)
downloadpoky-98905dd827f1e9c9a3e355827f347385dc81cad7.tar.gz
oe-publish-sdk: fix layers init via ssh
Escaping does not work in my use case. It must be escaped for python, ssh and shell as well as for different versions of echo. Let's try it a little less elegant, but hopefully more reliable. (From OE-Core rev: cdbc9bf63b3e1354800032d0dd530949bafb7032) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5cc1ae332eb6b05d83802c8d64ab2767c7079412) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-publish-sdk2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 4b70f436b1..19a5d69864 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -106,7 +106,7 @@ def publish(args):
106 if not is_remote: 106 if not is_remote:
107 cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo "*.pyc\n*.pyo\npyshtables.py" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true' % (destination, destination) 107 cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo "*.pyc\n*.pyo\npyshtables.py" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true' % (destination, destination)
108 else: 108 else:
109 cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo '*.pyc\n*.pyo\npyshtables.py' > .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true'" % (host, destdir, destdir) 109 cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; cp .git/hooks/post-update.sample .git/hooks/post-commit; echo '*.pyc' > .gitignore; echo '*.pyo' >> .gitignore; echo 'pyshtables.py' >> .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true'" % (host, destdir, destdir)
110 ret = subprocess.call(cmd, shell=True) 110 ret = subprocess.call(cmd, shell=True)
111 if ret == 0: 111 if ret == 0:
112 logger.info('SDK published successfully') 112 logger.info('SDK published successfully')