]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Sep 2020 15:00:40 +0000 (16:00 +0100)
commit17e92572278980d1a7f06de9d72c68baf57698f1
tree5807e0a287e0c440b1e357ae44db2557fc7d3bf4
parent4f78fc65bb0c9bff05651d9e543bab3d75998f79
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>
scripts/lib/devtool/deploy.py