[oe-commits] [openembedded-core] 01/03: classes/externalsrc: fix symlinking if symlink exists pointing to another path

git at git.openembedded.org git at git.openembedded.org
Wed Mar 2 11:46:21 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b3f30e6ecf591a767a0b5be10c027d451fc3612f
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Wed Mar 2 23:44:19 2016 +1300

    classes/externalsrc: fix symlinking if symlink exists pointing to another path
    
    If the oe-workdir / oe-logs symlink exists and points to a different
    path then the symlink needs to be removed before calling os.symlink() or
    it'll fail.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/externalsrc.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index b608bd0..0ec338c 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -115,6 +115,7 @@ python externalsrc_configure_prefunc() {
                 # Link already exists, leave it if it points to the right location already
                 if os.readlink(lnkfile) == target:
                     continue
+                os.unlink(lnkfile)
             elif os.path.exists(lnkfile):
                 # File/dir exists with same name as link, just leave it alone
                 continue

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list