summaryrefslogtreecommitdiff
path: root/system/abuild/inode.patch
blob: a3a7cef09ad0c9de9e55ed32bebf34a8b5c9025d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 9969ec002c408b616714a99a6317c7f996965dd4 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 19 Jan 2022 02:35:19 -0600
Subject: [PATCH] abuild: Correctly package files that fit in inode

On filesystems such as XFS, abuild will skip small files and symlinks
because the file fits in an inode and shows a size of 0.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Acked-by: Zach van Rijn <me@zv.io>
---
 abuild.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/abuild.in b/abuild.in
index 6bb087a..3e83563 100644
--- a/abuild.in
+++ b/abuild.in
@@ -927,7 +927,7 @@ prepare_metafiles() {
 		sync;;
 	esac
 
-	local size="$(du -sk | awk '{print $1 * 1024}')"
+	local size="$(du -sk --apparent-size | awk '{print $1 * 1024}')"
 
 	if [ "$arch" != "$apkbuild_arch" ]; then
 		local msg="Split function set arch=\"$arch\" for $name, use subpackages=pkg:split:arch format instead"
-- 
2.32.0 (Apple Git-132)