summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/path.py')
-rw-r--r--meta/lib/oe/path.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index c8d8ad05b9..5d21cdcbdf 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -1,4 +1,6 @@
1# 1#
2# Copyright OpenEmbedded Contributors
3#
2# SPDX-License-Identifier: GPL-2.0-only 4# SPDX-License-Identifier: GPL-2.0-only
3# 5#
4 6
@@ -123,7 +125,8 @@ def copyhardlinktree(src, dst):
123 if os.path.isdir(src): 125 if os.path.isdir(src):
124 if len(glob.glob('%s/.??*' % src)) > 0: 126 if len(glob.glob('%s/.??*' % src)) > 0:
125 source = './.??* ' 127 source = './.??* '
126 source += './*' 128 if len(glob.glob('%s/**' % src)) > 0:
129 source += './*'
127 s_dir = src 130 s_dir = src
128 else: 131 else:
129 source = src 132 source = src
@@ -169,6 +172,9 @@ def symlink(source, destination, force=False):
169 if e.errno != errno.EEXIST or os.readlink(destination) != source: 172 if e.errno != errno.EEXIST or os.readlink(destination) != source:
170 raise 173 raise
171 174
175def relsymlink(target, name, force=False):
176 symlink(os.path.relpath(target, os.path.dirname(name)), name, force=force)
177
172def find(dir, **walkoptions): 178def find(dir, **walkoptions):
173 """ Given a directory, recurses into that directory, 179 """ Given a directory, recurses into that directory,
174 returning all files as absolute paths. """ 180 returning all files as absolute paths. """