From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] core: fix packages-file-list.txt after an incremental build
Date: Mon, 17 Feb 2020 22:19:53 +0100 [thread overview]
Message-ID: <87eeusdi86.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20200214195734.32081-1-patrickdepinguin@gmail.com> (Thomas De Schampheleire's message of "Fri, 14 Feb 2020 20:57:33 +0100")
>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
> The package instrumentation step 'step_pkg_size' is populating the files:
> output/build/packages-file-list.txt
> output/build/packages-file-list-staging.txt
> output/build/packages-file-list-host.txt
> by comparing the list of files before and after installation of a package,
> with some clever tricks to detect changes to existing files etc.
> As an optimization, instead of gathering this list before and after each
> package, where the 'after-state' of one package is the same as the
> 'before-state' of the next package, only the 'after-state' is used and
> is shared between packages.
> This works fine, except at the end of the build, as explained next.
> In the target-finalize step, many files will be touched. For example, files
> like /etc/hosts, /etc/os-release, but also all object files that are
> stripped, and all files touched by post-build scripts or created by rootfs
> overlays. This means that the 'after-state' of the last package does not
> reflect the actual situation after target-finalize is run.
> For a single complete build this poses no problem. But, if one incrementally
> rebuilds a package after the initial build, e.g. with 'make foo-rebuild',
> then all changes that happened in target-finalize at the end of the initial
> build (the 'after-state' of the last package built) will be detected as
> changes caused by the rebuild of package foo. As a result, all these files
> will incorrectly be treated as 'owned' by package foo.
> Correct this situation by capturing a new state at the end of
> target-finalize, so that the 'before-state' of an incremental build will be
> correct.
> Note: the reasoning above talks about packages-file-list.txt and
> target-finalize, but also applies to
> packages-file-list-staging.txt/staging-finalize and
> packages-file-list-host.txt/host-finalize.
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Committed, thanks.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2020-02-17 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 19:57 [Buildroot] [PATCH] core: fix packages-file-list.txt after an incremental build Thomas De Schampheleire
2020-02-16 19:03 ` Thomas De Schampheleire
2020-02-17 21:19 ` Peter Korsgaard [this message]
2020-03-13 16:15 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeusdi86.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.