summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2020-09-07 18:43:13 +0200
committerSteve Sakoman <steve@sakoman.com>2020-09-09 04:16:15 -1000
commitcdbc9bf63b3e1354800032d0dd530949bafb7032 (patch)
tree3ed21127378de0074df59008bae46d5e698fb709
parent21d7ab8ce10f6d6a56875244c09dcfebae457b22 (diff)
downloadopenembedded-core-contrib-cdbc9bf63b3e1354800032d0dd530949bafb7032.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. 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>
-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):
if not is_remote:
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)
else:
- 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)
+ 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)
ret = subprocess.call(cmd, shell=True)
if ret == 0:
logger.info('SDK published successfully')