summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package.bbclass15
1 files changed, 3 insertions, 12 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index dcece40acd..2f3e9bfd14 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -427,22 +427,13 @@ python populate_packages () {
427 fpath = os.path.join(root,file) 427 fpath = os.path.join(root,file)
428 dpath = os.path.dirname(fpath) 428 dpath = os.path.dirname(fpath)
429 bb.mkdirhier(dpath) 429 bb.mkdirhier(dpath)
430
431 # Check if this is a hardlink to something... if it is
432 # attempt to preserve the link information, instead of copy.
433 if not os.path.islink(file): 430 if not os.path.islink(file):
434 s = os.stat(file) 431 os.link(file, fpath)
435 if s.st_nlink > 1: 432 continue
436 file_reference = "%d_%d" % (s.st_dev, s.st_ino)
437 if file_reference not in file_links:
438 # Save the reference for next time...
439 file_links[file_reference] = fpath
440 else:
441 os.link(file_links[file_reference], fpath)
442 continue
443 ret = bb.copyfile(file, fpath) 433 ret = bb.copyfile(file, fpath)
444 if ret is False or ret == 0: 434 if ret is False or ret == 0:
445 raise bb.build.FuncFailed("File population failed") 435 raise bb.build.FuncFailed("File population failed")
436
446 del localdata 437 del localdata
447 os.chdir(workdir) 438 os.chdir(workdir)
448 439