summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index 03d0a09..a71a2dd 100644
--- a/abuild.in
+++ b/abuild.in
@@ -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