aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oe/patch.py
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2010-07-26 09:43:19 -0700
committerChris Larson <chris_larson@mentor.com>2010-07-26 10:59:36 -0700
commitc47c6611be11d3b80f61a75f80187e9398eccbd4 (patch)
treea744f0ea729e14f2bf86438779b3a20c908e6539 /lib/oe/patch.py
parent8d209c6d13f52d872031b5ac41f2fb4ec2cd4170 (diff)
downloadopenembedded-c47c6611be11d3b80f61a75f80187e9398eccbd4.tar.gz
oe.patch: don't error when the symlink already exists and is correct
Adds oe.path.symlink convenience function. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/oe/patch.py')
-rw-r--r--lib/oe/patch.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/oe/patch.py b/lib/oe/patch.py
index 607ad44321..d7f4ccb9e9 100644
--- a/lib/oe/patch.py
+++ b/lib/oe/patch.py
@@ -1,3 +1,5 @@
+import oe.path
+
class NotFoundError(Exception):
def __init__(self, path):
self.path = path
@@ -230,7 +232,7 @@ class QuiltTree(PatchSet):
if not self.initialized:
self.InitFromDir()
PatchSet.Import(self, patch, force)
- os.symlink(patch["file"], self._quiltpatchpath(patch["file"]))
+ oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"]))
f = open(os.path.join(self.dir, "patches","series"), "a");
f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n")
f.close()