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