Skip to contentSkip to conversation

lib/oe/path: Deploy files can start only with a dot

PATCH New Vyacheslav Yurkov 1 participant 1 message Nov 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/oe/path: Deploy files can start only with a dot

From: Vyacheslav Yurkov <[email protected]>

There might be only hidden files deployed. In that case we don't need a generic wildcard present in copy command, otherwise it fails with:

Exception: subprocess.CalledProcessError: Command 'cp -afl --preserve=xattr ./.??* ./* <BUILDDIR>/tmp/deploy/images/qemux86-64' returned non-zero exit status 1.

Subprocess output:
cp: cannot stat './*': No such file or directory

---
 meta/lib/oe/path.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oe/path.py +2 -1
index 0dc8f172d5..e2f1913a35 100644
@@ -125,7 +125,8 @@ def copyhardlinktree(src, dst):
         if os.path.isdir(src):
             if len(glob.glob('%s/.??*' % src)) > 0:
                 source = './.??* '
-            source += './*'
+            if len(glob.glob('%s/**' % src)) > 0:
+                source += './*'
             s_dir = src
         else:
             source = src
Signature · 1 line
2.42.0