From patchwork Sun Apr 29 13:07:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 906327 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.136; helo=silver.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="G/DTVk5k"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Ynyx00sPz9s08 for ; Sun, 29 Apr 2018 23:07:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C7EFD22797; Sun, 29 Apr 2018 13:07:49 +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 ClUpm8grHRyK; Sun, 29 Apr 2018 13:07:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3BFC822715; Sun, 29 Apr 2018 13:07:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 7ADFE1BFC53 for ; Sun, 29 Apr 2018 13:07:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 784FF892F6 for ; Sun, 29 Apr 2018 13:07:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G7sc-K8ii3p0 for ; Sun, 29 Apr 2018 13:07:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from metanate.com (dougal.metanate.com [90.155.101.14]) by hemlock.osuosl.org (Postfix) with ESMTPS id 85812892E4 for ; Sun, 29 Apr 2018 13:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dFy0Hnh4Hu8Xtso6r6+VVDEXONdcOVliCL4Il8Nt34s=; b=G/DTVk5kYdb3duO2EYYPQpIV2J XkjfD5Il3PtkWegVjMI+9Z9FrYCI7Z+eOIE2+mRh6yxlGw8fPfdoxA82hVkT6PYB60sl6UQW4MbEz 15U2ye+c4zAC70Y1lmZ4i4n/4ptORGOXl8M65TlmxBQVUUwFjipH+i1kjS8lsBrPxNprnjU51QjPm ArsywrSlJnXWlXNjrDWZy9ea3j85E1sKBpzNb1vDbQXJc1O5KxuibrBu898ViCaacHV489PWnjY3O klKmwVxSHVltPkiXOffkMaao7mW5yWQbRvGwcY6lPql/OeA4xwXxXKTEi4nq/xp6VQjafUjCOL4dI 8tHLw4mA==; Received: from [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 1fCm2z-00066O-UR; Sun, 29 Apr 2018 14:07:22 +0100 From: John Keeping To: buildroot@buildroot.org Date: Sun, 29 Apr 2018 14:07:14 +0100 Message-Id: <20180429130714.14312-1-john@metanate.com> X-Mailer: git-send-email 2.17.0 Subject: [Buildroot] [PATCH] 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" --- 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' {} + \