Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/pkg-generic.mk: fix generation of package list in reinstall
Date: Thu, 5 Nov 2020 17:33:49 +0100	[thread overview]
Message-ID: <20201105173349.76b4d206@windsurf.home> (raw)
In-Reply-To: <20201105140401.1356161-1-unixmania@gmail.com>

Hello Carlos,

On Thu,  5 Nov 2020 11:04:01 -0300
unixmania at gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> Running "make <pkg>-reinstall" always shows a message like these:
> 
> comm: /.../build/pkg-x.y.z/.files-list.before: No such file or directory
> comm: /.../build/pkg-x.y.z/.files-list-staging.before: No such file or directory
> comm: /.../build/pkg-x.y.z/.files-list-host.before: No such file or directory
> 
> This happens because pkg_size_after is called in the .stamp_installed
> target and removes .files-list$(2).before, so in a second installation
> the file is not there anymore. This results in an empty .files-list.txt
> file.
> 
> Move the pkg_size_{before,after} calls from the .stamp_configured and
> .stamp_installed targets to the .stamp_{host,staging,target}_installed
> targets, respectively. This ensures that every pkg_size_after call has
> an immediately corresponding pkg_size_before call.

Unfortunately, this breaks the very reason why the .stamp_installed
step was added, as explained in the commit log for the change that
introduced this:

commit f2a12a8e9fa292ab61d99f963683a97f1283b7a3
Author: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date:   Thu Apr 30 11:52:40 2020 +0200

    package/pkg-generic.mk: introduce final 'install' step
    
    We currently have four different install steps: target installation,
    staging installation, images installation and host installation. These
    steps are directly triggered from the $(1)-install make target, so
    there is no place where we can run some logic once all installation
    steps have completed.
    
    However, as part of improving the reliability of the logic done in
    step_pkg_size_before and step_pkg_size_after to detect the files
    installed by packages, we would in fact need to run some logic after
    all installation steps have completed. This will allow us to make sure
    that all files are detected, even if a host package installs something
    in the target directory, or if a target package installs something in
    the host directory.
    
    To achieve this, this commit implements a new stamp file,
    .stamp_installed, which is a step that depends on all four install
    steps. Currently, this step does nothing except creating the stamp
    file.
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
    [yann.morin.1998 at free.fr: remove stampfile on foo-reinstall]
    Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

I'll try to think about the issue you've reported and see if I can come
up with some useful suggestions.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-11-05 16:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 14:04 [Buildroot] [PATCH] package/pkg-generic.mk: fix generation of package list in reinstall unixmania at gmail.com
2020-11-05 16:33 ` Thomas Petazzoni [this message]
2020-11-05 17:21   ` Carlos Santos
2020-11-05 21:16     ` Thomas Petazzoni

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=20201105173349.76b4d206@windsurf.home \
    --to=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox