From patchwork Thu Nov 5 14:04:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1395011 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JPIVb583; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CRlcx4yvSz9s0b for ; Fri, 6 Nov 2020 01:04:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E370F85766; Thu, 5 Nov 2020 14:04:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06uwPiFbTCKd; Thu, 5 Nov 2020 14:04:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4C89485784; Thu, 5 Nov 2020 14:04:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 069791BF83C for ; Thu, 5 Nov 2020 14:04:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 028A585784 for ; Thu, 5 Nov 2020 14:04:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MOQLyRKOj6e8 for ; Thu, 5 Nov 2020 14:04:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 3858C8577C for ; Thu, 5 Nov 2020 14:04:10 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id c27so1184742qko.10 for ; Thu, 05 Nov 2020 06:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zb6HyuBl5C7k334PtJwZNxvBDEvyyZzq2OJwduqP+lg=; b=JPIVb583TB4/6qVbZJvVai2Bqj13uiRXVUA/J1fLlrw+VGnnME3gnewVZB3NTVy8oZ A+psaQoJx9bacwEInBIhs4/wmMfUOd3HuLw2SVJmVg5aHisnMNzqJNLX5fjf7/8djF7t gMc1UkgSQ5FHONhEYMwQUsSjmpSNO25t/CtJFfYhouzi3NlyNNC8noNsaIed3EupzYiP gACWRLBgdGWe9I3rX7DQSU4e0LKbSThJ9K5gzNe4ql6AbdtM9mbApGPYVXZ4fXFIKP9T 5AH0q7wAKz5OdcmbghoI6U/iff8CYH0dKRvyInN1fCFHRUDQUB2rYYY6hZJHw5Kj2A0P Au8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zb6HyuBl5C7k334PtJwZNxvBDEvyyZzq2OJwduqP+lg=; b=KYHL+MSwmOPTbnv8vtsYDaiq0yOoEzIWnPLDTxXxpG3QS0CTdJXnuK3QGqJHrL/31B y8ChxnG1Hi9f63M2EBYd4F0CNKEFkFeGVTDrCpUzm+RE1t4XEMKyqeH8AwVT6N29j0+v aA0K+NjKoDa7o6Xn7hPX/fYb9eU+u3PgDfCk30rgJMuafsd0wfHtwDR7y/wIQIUMVPKz W9dIlc3aVQZImUHJl8LtQ4K0zSdOHwrQxTYQXOF73rSyy7n6wT90QwCC8460QwaqMdJQ coZrvdFt1eppW3RwUA/pBsYkhBsbVSRE1453LJKn8cDlG2mlDmuultZoZmXXRfW24m4c mQKA== X-Gm-Message-State: AOAM530G+68y6EArFpU69F0W6VPNKPw+hG4GQxxLJ9QDXgWt8Y7B95QG WCQ6TFyqhc3J6jjo+75hSlWS3c/g9sU= X-Google-Smtp-Source: ABdhPJy6nyY4j2ceEe3Ge3D5t67jZS0JS8XyTd+/93YXB2Pn8DjKIU01FQOSD1yMo9DaNUP1wiNMhg== X-Received: by 2002:a05:620a:1453:: with SMTP id i19mr2094939qkl.457.1604585049010; Thu, 05 Nov 2020 06:04:09 -0800 (PST) Received: from casantos.remote.csb.com (189.27.255.222.dynamic.adsl.gvt.net.br. [189.27.255.222]) by smtp.gmail.com with ESMTPSA id q6sm858775qtq.53.2020.11.05.06.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 06:04:08 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Thu, 5 Nov 2020 11:04:01 -0300 Message-Id: <20201105140401.1356161-1-unixmania@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/pkg-generic.mk: fix generation of package list in reinstall X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos Running "make -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. Signed-off-by: Carlos Santos --- package/pkg-generic.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 54de03da03..b13ecc5d8e 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -232,9 +232,6 @@ $(BUILD_DIR)/%/.stamp_configured: @$(call MESSAGE,"Configuring") $(Q)mkdir -p $(HOST_DIR) $(TARGET_DIR) $(STAGING_DIR) $(BINARIES_DIR) $(call prepare-per-package-directory,$($(PKG)_FINAL_DEPENDENCIES)) - @$(call pkg_size_before,$(TARGET_DIR)) - @$(call pkg_size_before,$(STAGING_DIR),-staging) - @$(call pkg_size_before,$(HOST_DIR),-host) $(call fixup-libtool-files,$(NAME),$(STAGING_DIR)) $(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep)) $($(PKG)_CONFIGURE_CMDS) @@ -256,9 +253,11 @@ $(BUILD_DIR)/%/.stamp_built:: $(BUILD_DIR)/%/.stamp_host_installed: @$(call step_start,install-host) @$(call MESSAGE,"Installing to host directory") + @$(call pkg_size_before,$(HOST_DIR),-host) $(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep)) +$($(PKG)_INSTALL_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) + @$(call pkg_size_after,$(HOST_DIR),-host) @$(call step_end,install-host) $(Q)touch $@ @@ -285,6 +284,7 @@ $(BUILD_DIR)/%/.stamp_host_installed: $(BUILD_DIR)/%/.stamp_staging_installed: @$(call step_start,install-staging) @$(call MESSAGE,"Installing to staging directory") + @$(call pkg_size_before,$(STAGING_DIR),-staging) $(foreach hook,$($(PKG)_PRE_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) +$($(PKG)_INSTALL_STAGING_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) @@ -320,6 +320,7 @@ $(BUILD_DIR)/%/.stamp_staging_installed: mv "$${la}.fixed" "$${la}"; \ fi || exit 1; \ done + @$(call pkg_size_after,$(STAGING_DIR),-staging) @$(call step_end,install-staging) $(Q)touch $@ @@ -337,6 +338,7 @@ $(BUILD_DIR)/%/.stamp_images_installed: $(BUILD_DIR)/%/.stamp_target_installed: @$(call step_start,install-target) @$(call MESSAGE,"Installing to target") + @$(call pkg_size_before,$(TARGET_DIR)) $(foreach hook,$($(PKG)_PRE_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) +$($(PKG)_INSTALL_TARGET_CMDS) $(if $(BR2_INIT_SYSTEMD),\ @@ -350,15 +352,13 @@ $(BUILD_DIR)/%/.stamp_target_installed: $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ fi + @$(call pkg_size_after,$(TARGET_DIR)) @$(call step_end,install-target) $(Q)touch $@ # Final installation step, completed when all installation steps # (host, images, staging, target) have completed $(BUILD_DIR)/%/.stamp_installed: - @$(call pkg_size_after,$(TARGET_DIR)) - @$(call pkg_size_after,$(STAGING_DIR),-staging) - @$(call pkg_size_after,$(HOST_DIR),-host) @$(call check_bin_arch) $(Q)touch $@