From ba93002cb1f4c5a89ee1d2571a39e5b0943eb4f4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Dec 2012 17:21:05 +0000 Subject: [PATCH] lib/oe/patch: Use force option when creating symlinks to patches Under the scenario where you have an existing source tree and you then change one of the patches, maybe to be architecture or machine specific, then rebuild, the build will fail since the symlink already exists but should now point at a different file. The easiest fix is to tell the system to remove and recreate the link which is done with the force option. (From OE-Core rev: 4741b90b170bc96e3a24f9c1dce871af060bc4d5) Signed-off-by: Richard Purdie Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/lib/oe/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index bc86bb5..7ab74fa 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -278,7 +278,7 @@ class QuiltTree(PatchSet): if not self.initialized: self.InitFromDir() PatchSet.Import(self, patch, force) - oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"])) + oe.path.symlink(patch["file"], self._quiltpatchpath(patch["file"]), force=True) f = open(os.path.join(self.dir, "patches","series"), "a"); f.write(os.path.basename(patch["file"]) + " -p" + patch["strippath"]+"\n") f.close() -- 2.7.4