]> code.ossystems Code Review - openembedded-core.git/commit
devtool: deploy-target: Fix size calculation for hard links
authorMichael Tretter <m.tretter@pengutronix.de>
Tue, 1 Sep 2020 13:29:00 +0000 (15:29 +0200)
committerSteve Sakoman <steve@sakoman.com>
Thu, 3 Sep 2020 03:13:47 +0000 (17:13 -1000)
commit85b1e835572d184cfff86a87fced8673d1d40a7c
treef6a8f8aee72590d84d7480ab356ab1f8840f2b3c
parent60b474320e2dd36bff9f0ef5f1dc491cbe734919
devtool: deploy-target: Fix size calculation for hard links

If a package contains hard links to a file, the file size is added for
each hard link instead of once for the file. Therefore, the calculated
size may be much larger than the actual package size.

For example, the mesa-megadriver package contains several hard links to
the same library.

Keep track of the inode numbers when listing the files that are
installed and use the actual size only for the first occurrence of an
inode. All further hard links to the same inode are added to the file
list, but accounted with size 0.

All file names need to be added to the file list, because the list is
used for preserving the files/hard links on the target.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 17e92572278980d1a7f06de9d72c68baf57698f1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/devtool/deploy.py