summaryrefslogblamecommitdiff
path: root/system/abuild/inode.patch
blob: a3a7cef09ad0c9de9e55ed32bebf34a8b5c9025d (plain) (tree)





























                                                                                                                      
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)