From patchwork Thu Jan 11 15:18:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 124240 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp816967qgn; Thu, 11 Jan 2018 07:18:42 -0800 (PST) X-Google-Smtp-Source: ACJfBov6sYOJZvzz0p+LTOm299LwZqMoWkrPRrtq5WK43Tw50eQfdv0pyimivNAA+qsDfY9rERWA X-Received: by 10.98.178.17 with SMTP id x17mr15672171pfe.57.1515683922621; Thu, 11 Jan 2018 07:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515683922; cv=none; d=google.com; s=arc-20160816; b=mwmm4KeEQJOVp1rzmV1c2H82wqdtovZMg0pNaRwzE3oc82HH7dvwTlNd2CHIcJ1fod RhhTNloSvhWaBXkvAQOKNULriVWd+xMU9rVVnAkeiN7DQrL/OH0zqqFgB4rN+LMWQ90t tlZP4TVNZWnNWF8h5EX2gMEv8rNJw6vmryDx0jOclrL7fDaJIUU/Xe0ZiOBZclSVcNIA MgQKyHskm992SSPq5fq/8GsVdtun1IKcCD3WFkmd8LOmgh8p2NHcr5MZIDsSTgyK55p7 gvbR/cUMPqTvAOrIUwMNMVKBwG5VWy6IRe9cT+m43mgqt0lDd3v/BBdAoTLt3qsCZ3yQ /fCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=9d4Le3aOwxMDQP4zQc71cho9opD1xe9qbYfRuO7PbCc=; b=Ioaw9mr3v1HKx8/WGrdA/FcTeXF0UFubfZJ6t2RTXd09zoY9j0k94lxQlwT986OC4d SPwPb73sHUfOSbU6GTkySIzkepMyU9SMRBEqwpmfGX/Wvq9nMrp5I1ApXvPcy7D+WiM9 8LLE0BoeAIHW5xCBWB/FhJrZDNQIkDkDtWj/jSW9xuYsSCF/h1f5O9WztUOjBvLwOxPu gCz6hVgSyvbKei+eZ2ciCvAnYCbA3FVPsTSjpdn7CpOezwBnYY5ECiAzBNJQHuRq6+eP G7v0a3B7p4ZGBIfr81cvlIqiX+PLsJlP8heJ3epuK/KzeD2IqjP/iQZj97FrMxfvelcS GqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=g9KEEd5p; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id i198si5990029pgd.214.2018.01.11.07.18.42; Thu, 11 Jan 2018 07:18:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=g9KEEd5p; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 7BB08787E0; Thu, 11 Jan 2018 15:18:38 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by mail.openembedded.org (Postfix) with ESMTP id 65BB977E92 for ; Thu, 11 Jan 2018 15:18:37 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id s13so2472074wra.10 for ; Thu, 11 Jan 2018 07:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=/OHq5g0hmw/y+gPFsfNnXEPfOaHUSeQi81TrjR7QZlg=; b=g9KEEd5p+ha0HWUF3xwIAd4oaj+I1pMXAmfzvOy9iBxsNpnoyUbMkQ+PadAsdlspvu yPeN0E4Nc2k011CY+mJHboAcEyISPlG5hFqGTz99Q9EWjIF8HwiqQW2Lx1G8BI/V+jcp 1IE+1WjcjYz1yNOJb0G1JWIU6PMYEcaAUAE0p8Gy0tGjHlTups8l4JgkjpqK5adOd8UX vTP6llD7jCc0hZF5toueSMDI8fmJWa1z055HNb43eCT/Z/pu6j1yMy+q1o1L6/2Aze0X u2mJ30bFRv1GivG4RJIQ5DMqy4l9hUOVje0vaWZUVEhjvodu1WGHLLJAmHKL9D8rtuAI DWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=/OHq5g0hmw/y+gPFsfNnXEPfOaHUSeQi81TrjR7QZlg=; b=RvRWeMB8lM3yJ7uIMqskxv/6hft+8mO2YkmIK7tWqqF6Xh5L43btTzrTk2QgEm/h/D A/c1vfO1myiMr60bcJoKEnQNouf4GdKC3fHIWSa4BNgA2dhDXd8u5bLb+/M+Af/PWc6h TXwny1/bYWVDgXpTl7p2iiFOeb8gFFp0qExR432zarkhh9aEyNYpdXXkYTpIFVRxtOEh qxjkGR+QGJvT7NM9jAuSZk+yCOKKdlZKRW8ZY9jCNb/6/lYIFkVs5uZGhPN0ZTj1MjDB FhFvvR+fd0pitrrWAxR1C4OHptU5flxZJBS38WZWD623PIS5TJBfssSgzA/pFDe48whr nOYg== X-Gm-Message-State: AKGB3mIx3mSepTuY134ahGzmsDq9qBb30vawg48tzJPnFJDe4mTIGVhZ +/RvcihheGFhlwxhvEozJ+1HxLBG X-Received: by 10.223.208.206 with SMTP id z14mr21096399wrh.109.1515683917969; Thu, 11 Jan 2018 07:18:37 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id a2sm11181445wrf.56.2018.01.11.07.18.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jan 2018 07:18:37 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 11 Jan 2018 15:18:34 +0000 Message-Id: <20180111151834.4169-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] image: use du --apparent-size when calculating rootfs size X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org We should pass --apparent-size to du when calculating how large the rootfs is as otherwise we get the actual disk usage, which if the files are compressed by the file system (such as ZFS) may be sufficiently smaller than the space required by the image that construction will fail. Signed-off-by: Ross Burton --- meta/classes/image.bbclass | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core Signed-off-by: Ross Burton <ross.burton@intel.com>
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 4531aa2a57a..8e763e4d543 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -534,6 +534,7 @@ def get_rootfs_size(d): initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE') output = subprocess.check_output(['du', '-ks', + '--apparent-size', d.getVar('IMAGE_ROOTFS')]) size_kb = int(output.split()[0])