summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorG.J.R. Timmer <gjr.timmer@gmail.com>2017-02-08 13:09:16 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-08 13:10:36 +0200
commit21bf69f6add0c26f41ed215169f8799087ee24f5 (patch)
tree0f0d07cc34bd89644ab9a3c3ffaa2e2403baf651 /abuild.in
parentab79e3fe6f2664d1aed5722c4ee6168dac8e9966 (diff)
downloadabuild-21bf69f6add0c26f41ed215169f8799087ee24f5.tar.gz
abuild-21bf69f6add0c26f41ed215169f8799087ee24f5.tar.bz2
abuild-21bf69f6add0c26f41ed215169f8799087ee24f5.tar.xz
abuild-21bf69f6add0c26f41ed215169f8799087ee24f5.zip
abuild: fix package size calculation on certain filesystems
Diffstat (limited to 'abuild.in')
-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