All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] core/pkg-generic: only save latest package list
@ 2018-04-29 13:07 John Keeping
  2018-04-30 16:47 ` Yann E. MORIN
  0 siblings, 1 reply; 16+ messages in thread
From: John Keeping @ 2018-04-29 13:07 UTC (permalink / raw)
  To: buildroot

When rebuilding a package, simply appending the package's file list to
the global list means that the package list grows for every rebuild, as
does the time taken to check for files installed by multiple packages.
Furthermore, we get false positives where a file is reported as being
installed by multiple copies of the same package.

With this approach we may end up with orphaned files in the target
filesystem if a package that has been updated and rebuilt no longer
installs the same set of files, but we know that only a clean build will
produce reliable results.  In fact it may be helpful to identify these
orphaned files as evidence that the build is not clean.

Signed-off-by: John Keeping <john@metanate.com>
---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 1c9dd1d734..edc2c9349c 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -64,6 +64,7 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time
 # $(3): suffix of file  (optional)
 define step_pkg_size_inner
 	cd $(2); \
+	$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt; \
 	find . \( -type f -o -type l \) \
 		-newer $($(PKG)_DIR)/.stamp_built \
 		-exec printf '$(1),%s\n' {} + \
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-01-05 16:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-29 13:07 [Buildroot] [PATCH] core/pkg-generic: only save latest package list John Keeping
2018-04-30 16:47 ` Yann E. MORIN
2018-04-30 16:56   ` John Keeping
2018-04-30 19:41     ` Yann E. MORIN
2018-05-01 11:13       ` [Buildroot] [PATCH v2] " John Keeping
2018-05-01 12:04         ` Yann E. MORIN
2018-05-01 12:26           ` John Keeping
2018-05-01 12:28             ` [Buildroot] [PATCH v3] " John Keeping
2018-05-01 12:31               ` Yann E. MORIN
2018-05-01 13:26               ` Thomas Petazzoni
2018-05-01 21:01               ` Peter Korsgaard
2019-01-04 13:12               ` Yann E. MORIN
2019-01-04 15:30                 ` Nicolas Cavallari
2019-01-04 17:51                   ` Yann E. MORIN
2019-01-05 10:23                     ` Nicolas Cavallari
2019-01-05 16:39                       ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.