Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/476306/?format=api
{ "id": 476306, "url": "http://patchwork.ozlabs.org/api/patches/476306/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/1432591007-27689-2-git-send-email-thomas.petazzoni@free-electrons.com/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1432591007-27689-2-git-send-email-thomas.petazzoni@free-electrons.com>", "list_archive_url": null, "date": "2015-05-25T21:56:44", "name": "[v4,2015.08,1/4] pkg-generic: add step_pkg_size global instrumentation hook", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f34d4a0c900b9c5e5f8a3031f6437c1d229ff0e6", "submitter": { "id": 2230, "url": "http://patchwork.ozlabs.org/api/people/2230/?format=api", "name": "Thomas Petazzoni", "email": "thomas.petazzoni@free-electrons.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/1432591007-27689-2-git-send-email-thomas.petazzoni@free-electrons.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/476306/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/476306/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@busybox.net>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "buildroot@lists.busybox.net" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "buildroot@osuosl.org" ], "Received": [ "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 0B9E01402B5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 May 2015 07:56:55 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 32C4F91556;\n\tMon, 25 May 2015 21:56:55 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 3JLyhZ8pr9bl; Mon, 25 May 2015 21:56:52 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 74AC091542;\n\tMon, 25 May 2015 21:56:52 +0000 (UTC)", "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 185971BFA9E\n\tfor <buildroot@lists.busybox.net>;\n\tMon, 25 May 2015 21:56:52 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 118AF9153A\n\tfor <buildroot@lists.busybox.net>;\n\tMon, 25 May 2015 21:56:52 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id k6z1aWOFdpR5 for <buildroot@lists.busybox.net>;\n\tMon, 25 May 2015 21:56:51 +0000 (UTC)", "from mail.free-electrons.com (down.free-electrons.com\n\t[37.187.137.238])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1EB8E91535\n\tfor <buildroot@uclibc.org>; Mon, 25 May 2015 21:56:51 +0000 (UTC)", "by mail.free-electrons.com (Postfix, from userid 106)\n\tid D3BD1800; Mon, 25 May 2015 23:56:50 +0200 (CEST)", "from localhost (AToulouse-657-1-1132-11.w92-156.abo.wanadoo.fr\n\t[92.156.54.11])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 8B795279;\n\tMon, 25 May 2015 23:56:50 +0200 (CEST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "From": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>", "To": "buildroot@uclibc.org", "Date": "Mon, 25 May 2015 23:56:44 +0200", "Message-Id": "<1432591007-27689-2-git-send-email-thomas.petazzoni@free-electrons.com>", "X-Mailer": "git-send-email 2.1.0", "In-Reply-To": "<1432591007-27689-1-git-send-email-thomas.petazzoni@free-electrons.com>", "References": "<1432591007-27689-1-git-send-email-thomas.petazzoni@free-electrons.com>", "Cc": "Thomas Petazzoni <thomas.petazzoni@free-electrons.com>", "Subject": "[Buildroot] [PATCH v4 2015.08 1/4] pkg-generic: add step_pkg_size\n\tglobal instrumentation hook", "X-BeenThere": "buildroot@busybox.net", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.busybox.net>", "List-Unsubscribe": "<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>", "List-Archive": "<http://lists.busybox.net/pipermail/buildroot/>", "List-Post": "<mailto:buildroot@busybox.net>", "List-Help": "<mailto:buildroot-request@busybox.net?subject=help>", "List-Subscribe": "<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@busybox.net", "Sender": "\"buildroot\" <buildroot-bounces@busybox.net>" }, "content": "This patch adds a global instrumentation hook that collects the list\nof files installed in $(TARGET_DIR) by each package, and stores this\nlist into a file called $(BUILD_DIR)/packages-file-list.txt. It can\nlater be used to determine the size contribution of each package to\nthe target root filesystem.\n\nNote that in order to detect if a file installed by one package is\nlater overriden by another package, we calculate the md5 of installed\nfiles and compare them at each installation of a new package.\n\nThis commit also adds a Config.in option to enable the collection of\nthis data, as calculating the md5 of all installed files at the\nbeginning and end of the installation of each package can be\nconsidered a time-consuming process which maybe some users will not be\nwilling to suffer from.\n\nSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n---\n package/pkg-generic.mk | 32 ++++++++++++++++++++++++++++++++\n 1 file changed, 32 insertions(+)", "diff": "diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk\nindex d5b29f0..944b0fc 100644\n--- a/package/pkg-generic.mk\n+++ b/package/pkg-generic.mk\n@@ -55,6 +55,38 @@ define step_time\n endef\n GLOBAL_INSTRUMENTATION_HOOKS += step_time\n \n+# Hooks to collect statistics about installed files\n+\n+# This hook will be called before the target installation of a\n+# package. We store in a file named .br_filelist_before the list of\n+# files currently installed in the target. Note that the MD5 is also\n+# stored, in order to identify if the files are overwritten.\n+define step_pkg_size_start\n+\t(cd $(TARGET_DIR) ; find . -type f -print0 | xargs -0 md5sum) | sort > \\\n+\t\t$($(PKG)_DIR)/.br_filelist_before\n+endef\n+\n+# This hook will be called after the target installation of a\n+# package. We store in a file named .br_filelist_after the list of\n+# files (and their MD5) currently installed in the target. We then do\n+# a diff with the .br_filelist_before to compute the list of files\n+# installed by this package.\n+define step_pkg_size_end\n+\t(cd $(TARGET_DIR); find . -type f -print0 | xargs -0 md5sum) | sort > \\\n+\t\t$($(PKG)_DIR)/.br_filelist_after\n+\tcomm -13 $($(PKG)_DIR)/.br_filelist_before $($(PKG)_DIR)/.br_filelist_after | \\\n+\t\twhile read hash file ; do \\\n+\t\t\techo \"$(1),$${file}\" >> $(BUILD_DIR)/packages-file-list.txt ; \\\n+\t\tdone\n+endef\n+\n+define step_pkg_size\n+\t$(if $(filter install-target,$(2)),\\\n+\t\t$(if $(filter start,$(1)),$(call step_pkg_size_start,$(3))) \\\n+\t\t$(if $(filter end,$(1)),$(call step_pkg_size_end,$(3))))\n+endef\n+GLOBAL_INSTRUMENTATION_HOOKS += step_pkg_size\n+\n # User-supplied script\n ifneq ($(BR2_INSTRUMENTATION_SCRIPTS),)\n define step_user\n", "prefixes": [ "v4", "2015.08", "1/4" ] }