summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/pkg-generic.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index f5cab2b9c2..6168b40e89 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -63,13 +63,21 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time
# $(2): base directory to search in
# $(3): suffix of file (optional)
define step_pkg_size_inner
+ @touch $(BUILD_DIR)/.files-list$(3).stat
@touch $(BUILD_DIR)/packages-file-list$(3).txt
$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt
cd $(2); \
- find . \( -type f -o -type l \) \
- -newer $($(PKG)_DIR)/.stamp_built \
- -exec printf '$(1),%s\n' {} + \
+ LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
+ | LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new
+ LC_ALL=C comm -13 \
+ $(BUILD_DIR)/.files-list$(3).stat \
+ $(BUILD_DIR)/.files-list$(3).new \
+ > $($(PKG)_BUILDDIR)/.files-list$(3).txt
+ sed -r -e 's/^[^,]+/$(1)/' \
+ $($(PKG)_BUILDDIR)/.files-list$(3).txt \
>> $(BUILD_DIR)/packages-file-list$(3).txt
+ mv $(BUILD_DIR)/.files-list$(3).new \
+ $(BUILD_DIR)/.files-list$(3).stat
endef
define step_pkg_size
OpenPOWER on IntegriCloud