summaryrefslogtreecommitdiffstats
path: root/scripts/oe-publish-sdk
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-08 16:43:40 +0100
commitda44b89f6611c80ceee40f75a9314d1749107581 (patch)
tree53d91cd20adbe3261e85c635b8637d979c93586e /scripts/oe-publish-sdk
parentdbe75a790d7dbe70f2492005ffc083054ba7b8db (diff)
downloadpoky-da44b89f6611c80ceee40f75a9314d1749107581.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: 5cc1ae332eb6b05d83802c8d64ab2767c7079412) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-publish-sdk')
-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')