mirror of
https://git.yoctoproject.org/poky-contrib
synced 2025-05-08 23:52:25 +08:00
lib/oe/path.py: Add relsymlink()
Adds API to make a relative symbolic link between two directories. The arguments are the same as oe.path.symlink() (From OE-Core rev: 3eeec7f3412e881e51763ef947c82772d3858f09) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
d59c3c718a
commit
a22f7d7b53
@ -172,6 +172,9 @@ def symlink(source, destination, force=False):
|
||||
if e.errno != errno.EEXIST or os.readlink(destination) != source:
|
||||
raise
|
||||
|
||||
def relsymlink(target, name, force=False):
|
||||
symlink(os.path.relpath(target, os.path.dirname(name)), name, force=force)
|
||||
|
||||
def find(dir, **walkoptions):
|
||||
""" Given a directory, recurses into that directory,
|
||||
returning all files as absolute paths. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user