abuild: fix package size calculation on certain filesystems

This commit is contained in:
G.J.R. Timmer 2017-02-08 13:09:16 +02:00 committed by Timo Teräs
parent ab79e3fe6f
commit 21bf69f6ad
1 changed files with 7 additions and 0 deletions

View File

@ -836,6 +836,13 @@ prepare_metafiles() {
cd "$dir"
mkdir -p "$controldir"
local builddate=$(date -u "+%s")
# Fix package size on several filesystems
case "$(df -PT . | awk 'END {print $2}')" in
btrfs|ecryptfs|zfs)
sync;;
esac
local size=$(du -sk | awk '{print $1 * 1024}')
if [ "$arch" != "$apkbuild_arch" ]; then