From patchwork Tue May 1 12:28:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 907025 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=metanate.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.b="M5hECZSH"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40b11J3CYVz9s1d for ; Tue, 1 May 2018 22:29:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4D0C585784; Tue, 1 May 2018 12:29:04 +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 O9uBgeihjI3I; Tue, 1 May 2018 12:29:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4EBA28575F; Tue, 1 May 2018 12:29:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 78CE71C40B6 for ; Tue, 1 May 2018 12:29:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 758D52588A for ; Tue, 1 May 2018 12:29:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19bcU+Nh6z2v for ; Tue, 1 May 2018 12:29:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from metanate.com (dougal.metanate.com [90.155.101.14]) by silver.osuosl.org (Postfix) with ESMTPS id A1E9424F06 for ; Tue, 1 May 2018 12:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a59qkswfwOOLfitV8sNAD9/4d59V4AT2UNKwHIvjsv8=; b=M5hECZSH+TVP5Nzv0r+zpxCO+o QWAGib77BZQw4gTfZhXsqqF7HnPAahQOjC2M6+TS759kbyckEBKdz4ZTRsnK7VpLuWErfQUB7jGme ms8qlsafhG7d1McvL0lyL64qLpSXCfrDmv6VWPt8vzMVW2T492q6gizVtFyouO8JHOICTO0Q301nM jX4n4WgH8CN1pTcx1QIdxenkm1ajQy/jKPJa/nBjiJk7RK3uBZ4VnaGT0quwA/EBnLg+dUrPGZSVn ptcBQ74nJpkFESuW4N2vWVAxEJ5uxb34qkxW/USrBua2cLCT34rejiayXw10wphWfHdQlkI9Zpcs2 sjRMbmpg==; Received: from dougal.metanate.com ([192.168.88.1] helo=conrad.metanate.com) by shrek.metanate.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fDUOs-0002cS-EB; Tue, 01 May 2018 13:28:55 +0100 From: John Keeping To: buildroot@buildroot.org Date: Tue, 1 May 2018 13:28:41 +0100 Message-Id: <20180501122841.13818-1-john@metanate.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180501132629.4a4831bb.john@metanate.com> References: <20180501132629.4a4831bb.john@metanate.com> Subject: [Buildroot] [PATCH v3] core/pkg-generic: only save latest package list X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Keeping , "Yann E. MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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 Reviewed-by: "Yann E. MORIN" --- Changes in v3: - Use touch instead of redirect to avoid truncating the file package/pkg-generic.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index bd47ca1964..87c856407d 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -63,6 +63,8 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time # $(2): base directory to search in # $(3): suffix of file (optional) define step_pkg_size_inner + @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 \