aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/0001-abuild-properly-detect-package-size-on-filesystems.patch
blob: 2aab1b1c93375684f6c9b1cb968889a7017ed81d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/abuild.in b/abuild.in
index 35b7995572..2d1d9e644d 100644
--- a/abuild.in
+++ b/abuild.in
@@ -812,6 +812,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