diff options
-rw-r--r-- | scripts/lib/devtool/deploy.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index 6a997735fc..aaa25dda08 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py | |||
@@ -177,13 +177,19 @@ def deploy(args, config, basepath, workspace): | |||
177 | rd.getVar('base_libdir'), rd) | 177 | rd.getVar('base_libdir'), rd) |
178 | 178 | ||
179 | filelist = [] | 179 | filelist = [] |
180 | inodes = set({}) | ||
180 | ftotalsize = 0 | 181 | ftotalsize = 0 |
181 | for root, _, files in os.walk(recipe_outdir): | 182 | for root, _, files in os.walk(recipe_outdir): |
182 | for fn in files: | 183 | for fn in files: |
184 | fstat = os.lstat(os.path.join(root, fn)) | ||
183 | # Get the size in kiB (since we'll be comparing it to the output of du -k) | 185 | # Get the size in kiB (since we'll be comparing it to the output of du -k) |
184 | # MUST use lstat() here not stat() or getfilesize() since we don't want to | 186 | # MUST use lstat() here not stat() or getfilesize() since we don't want to |
185 | # dereference symlinks | 187 | # dereference symlinks |
186 | fsize = int(math.ceil(float(os.lstat(os.path.join(root, fn)).st_size)/1024)) | 188 | if fstat.st_ino in inodes: |
189 | fsize = 0 | ||
190 | else: | ||
191 | fsize = int(math.ceil(float(fstat.st_size)/1024)) | ||
192 | inodes.add(fstat.st_ino) | ||
187 | ftotalsize += fsize | 193 | ftotalsize += fsize |
188 | # The path as it would appear on the target | 194 | # The path as it would appear on the target |
189 | fpath = os.path.join(destdir, os.path.relpath(root, recipe_outdir), fn) | 195 | fpath = os.path.join(destdir, os.path.relpath(root, recipe_outdir), fn) |