diff options
-rw-r--r-- | meta/classes/package.bbclass | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index df9aacb237..9cfe43cbd1 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1043,15 +1043,18 @@ python split_and_strip_files () { | |||
1043 | for ref in inodes: | 1043 | for ref in inodes: |
1044 | if len(inodes[ref]) == 1: | 1044 | if len(inodes[ref]) == 1: |
1045 | continue | 1045 | continue |
1046 | |||
1047 | target = inodes[ref][0][len(dvar):] | ||
1046 | for file in inodes[ref][1:]: | 1048 | for file in inodes[ref][1:]: |
1047 | src = file[len(dvar):] | 1049 | src = file[len(dvar):] |
1048 | dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend | 1050 | dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(target) + debugappend |
1049 | fpath = dvar + dest | 1051 | fpath = dvar + dest |
1050 | target = inodes[ref][0][len(dvar):] | ||
1051 | ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend | 1052 | ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend |
1052 | bb.utils.mkdirhier(os.path.dirname(fpath)) | 1053 | bb.utils.mkdirhier(os.path.dirname(fpath)) |
1053 | #bb.note("Link %s -> %s" % (fpath, ftarget)) | 1054 | # Only one hardlink of separated debug info file in each directory |
1054 | os.link(ftarget, fpath) | 1055 | if not os.access(fpath, os.R_OK): |
1056 | #bb.note("Link %s -> %s" % (fpath, ftarget)) | ||
1057 | os.link(ftarget, fpath) | ||
1055 | 1058 | ||
1056 | # Create symlinks for all cases we were able to split symbols | 1059 | # Create symlinks for all cases we were able to split symbols |
1057 | for file in symlinks: | 1060 | for file in symlinks: |