diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/kernel.bbclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index a82e4cf942..f7d199e917 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
| @@ -176,13 +176,14 @@ do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILD | |||
| 176 | do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" | 176 | do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}" |
| 177 | python do_symlink_kernsrc () { | 177 | python do_symlink_kernsrc () { |
| 178 | s = d.getVar("S") | 178 | s = d.getVar("S") |
| 179 | if s[-1] == '/': | ||
| 180 | # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail | ||
| 181 | s=s[:-1] | ||
| 182 | kernsrc = d.getVar("STAGING_KERNEL_DIR") | 179 | kernsrc = d.getVar("STAGING_KERNEL_DIR") |
| 183 | if s != kernsrc: | 180 | if s != kernsrc: |
| 184 | bb.utils.mkdirhier(kernsrc) | 181 | bb.utils.mkdirhier(kernsrc) |
| 185 | bb.utils.remove(kernsrc, recurse=True) | 182 | bb.utils.remove(kernsrc, recurse=True) |
| 183 | if s[-1] == '/': | ||
| 184 | # drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as | ||
| 185 | # directory name and fail | ||
| 186 | s = s[:-1] | ||
| 186 | if d.getVar("EXTERNALSRC"): | 187 | if d.getVar("EXTERNALSRC"): |
| 187 | # With EXTERNALSRC S will not be wiped so we can symlink to it | 188 | # With EXTERNALSRC S will not be wiped so we can symlink to it |
| 188 | os.symlink(s, kernsrc) | 189 | os.symlink(s, kernsrc) |
