[oe-commits] Richard Purdie : lib/oe/patch: Use force option when creating symlinks to patches

git at git.openembedded.org git at git.openembedded.org
Fri Dec 14 17:44:12 UTC 2012


Module: openembedded-core.git
Branch: master-next
Commit: db9f289101bb177d1a84fe164d5c114d3bdbd1e5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=db9f289101bb177d1a84fe164d5c114d3bdbd1e5

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Dec 14 17:21:05 2012 +0000

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.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/patch.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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()





More information about the Openembedded-commits mailing list