From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 29 Nov 2024 07:22:40 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f184.google.com (mail-pf1-f184.google.com [209.85.210.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AT6MdIb023348 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Nov 2024 07:22:40 +0100 Received: by mail-pf1-f184.google.com with SMTP id d2e1a72fcca58-724fc3f60c1sf2207448b3a.2 for ; Thu, 28 Nov 2024 22:22:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732861353; cv=pass; d=google.com; s=arc-20240605; b=i45zYftr5+eU3uCYZw9sZJerh3DvOloXktyFEvBTWPkK3khvqNvResw3BcP8w8IjQk 2WbzqPmykoJSf1VTwt9t2uS2AUsb88l36eo7lOCOvSXhBc5h/lnBuRf97FPSq6IvtXQg o6lTyZnUxpxEIMdItZxlWTO3uMNk21U5wNHzf5g5+4j9Cf7Iip+13x7o2KUyh2+psuGD cbNvcwY+oZoIMe5uLG1GMWnHjDrJP6QZpKPAMCVFd4Y0b1mQF4JenEqLwPiiM3B9wEGb sgjhdpaVW/N0Ef9tflJouX03o9AqLVylWzGXosqbqQ14jWObe8ge2zK/RSAZci2VMlH7 eFMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=mCVQrs6CxcZsTHYJqMpoZDWKX294nRf7F2/ohYvkT+I=; fh=e8BggExHY+RdrTz5Uyc+Zag8htl5Bsqd+OgW4WraoFI=; b=Zj20BGMQsbd2bOdV3GeIIJ+6y4k60N/k3JXlGJXSczurXcqfNvZLqDhtrkW9C8pPs1 CuAGoVjfCHAPNAtgGDSqDN8//BmarQPyxfZGXCdHahkWOg74BfajK566odIA6h8OB0xG lLSPK22mbUFBWHYRvlL8MLSdZupyp6+BtfkScWesy9qCyeJ5W2HHPLVO+aKNiqcIutcJ GFaYzFyt56VqBGU6qpkNfattl8cTBdCqI5vEVgq7WyqFEGPGZeKJD1fkOPt2qquaPSWI MV0Uj0EhmLTmnYAWVu1EiUrkBA5WabKjH0yk2FsESR3yPQhS+C4Bpu4UnIepsg071NSC H18g==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1732861353; x=1733466153; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=mCVQrs6CxcZsTHYJqMpoZDWKX294nRf7F2/ohYvkT+I=; b=gL5Uhx6+T3hcQXjCg4kUX4NltNuEJb0SJO6bmU65180d0UT3eK7bfCfJ86FJWQkRh9 1N2+4M7ktwSUtmkpn+oJP+XORPUp27djiggVr6T6KwErFLeZKiRMKcFCOV7aFS4pIdjq gfeQ2US2XVfwPzZlGnhZmHcIHL+jK6KJ79Gow/e9oYTZBYy6P4IPB2WnCXtNmWGyfn2u M4J3qFpKAfV+evZpCEF1r6FMPameS7xqZeXNWYebIysyItRHjFVv8Fs1+QN6CFIwudSQ +Ec+480yc47bFGlsx41YzfzUpsx9nSegtvO9ZkLquQRABsFfVgTOfZ+CRQwiXoKr1Xkl OlRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732861353; x=1733466153; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=mCVQrs6CxcZsTHYJqMpoZDWKX294nRf7F2/ohYvkT+I=; b=DQLspnTfMbosjdjmnrUX+f8yMEBHpusNnTtKD8ih660Ysj0keS1YDOZe2T1goJuZjG QWzVcJeHL1hjH0fYJN7jxtyCWNMtoJEaHhWCHwsn/ZRLjFdlq6WPMj20ejWlc/guTtO/ UQ1OWHqOUusmxVjY9k8HdFuBY9R+yuyEeOo/xq0XJxMNK8jni9jl6HAU/fEdEfm+V6yx bl/ncrBSHN9hYf0nm5JN/fVwFRxGSCqNUAUkA1XKCPgnvg0FGeaQ6KNpgbHcEd85Hlf6 9SgbsN47v7SDfNea69cZRERMQI3C4u+80TXKETWhQNZ6PLlyC8rm8aB/qT9xCOQtiSdn 1z5Q== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCX7CcuFHoEUFoMYRvKjcZAymuXNVZHqhKPm1kddBp/cll9o71d0Ps4IyTihTSVjj8dQ94RA@ilbers.de X-Gm-Message-State: AOJu0YyW5C8m5wrqDBZI+CPNFkcCByc3BJc/tLQ0ipODgRepAVMieqYC VpiVmUhjausd8oSoFsYOiBgU9VQG8xhNt8DgS/uVq8uoZp/of0ZY X-Google-Smtp-Source: AGHT+IEsA8/uOyzVtWfQQVd5JYP57diMXguPXS5RyW/v0meU5pdrUlq6d9Iqornnehncrajmcd5kJg== X-Received: by 2002:a17:903:283:b0:214:f87b:c154 with SMTP id d9443c01a7336-21501087636mr139118795ad.5.1732861353160; Thu, 28 Nov 2024 22:22:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:fc90:b0:215:3d34:776c with SMTP id d9443c01a7336-2153d34791bls3039305ad.0.-pod-prod-03-us; Thu, 28 Nov 2024 22:22:31 -0800 (PST) X-Received: by 2002:a17:902:db0e:b0:20c:bbac:2013 with SMTP id d9443c01a7336-21501f63db2mr144517525ad.48.1732861351444; Thu, 28 Nov 2024 22:22:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732861351; cv=none; d=google.com; s=arc-20240605; b=jsXR7m8Y/QQd1EVjdUYQ+ArkYDhwno+Vf8rSCtekiqBEkkqvydIbCn3Xj7ppjHbvRH NqWk2VP9kddys6ijumHHfR08OxdYQNHY8bHhz+q3X/94nI6l/eFwzh4915ki4+VwDVMS yZcCknp/iMypkl2XQHXYHzfi5BAlBQPQkNloo/Zn4NQmaUqBUD5vISAamQXnmkyIWnkk 2LKKxstN2ORouHYfg71PUsvekewaviJCD1LKF1sZOM255UlC4XkLd/3nP6Ig4dXhl9FE 7fTDD3zb4x+NhgEzzZWZihFP69C+ckqLBxx4imXQW5t1aEK3nKzDdKOEWjLR+sPk0dYd GBMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=3FUnBugxmOHbrkmYO2YRHsPHkUHowmyY90vJOtv/iik=; fh=95wLIF1hw/zIpqq2Ec+GyUgTsRZ8XfjQM59TjRw6kJk=; b=Q2bRwZLGvfaEFIqyjfTM/qzOVp/R+HhfzOzBGcFxxa9H+XyCkllk2cHF+/waf0VzMZ Of6Qhx3EC9M3XkgJPfa210gfTrW3PNGqaFXSdFnW7LQCupyM6cYQiPQznQzp+W/jvQ87 nizSjGcpgr6JCjjijDC+QAc6j8TW8USSNPoxxYxekJrpacnEG6LOpO2qNQKyCcLgNZu0 IwVrj/3JD1ijrU2glrfgiurIgbT7j7LprWIwGZ/8HmpyvyFcIYoF+Sk0IVpqEylfmbr1 mHLSi6efxv9N74LOrfkIj3Z00B3AHukwArlD8uXS6O7r5WIlP3Mfcs83kBHWcbvAUZUo kWWg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com Received: from mo-csw.securemx.jp (mo-csw1802.securemx.jp. [210.130.202.152]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-2154759b5efsi104015ad.1.2024.11.28.22.22.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2024 22:22:31 -0800 (PST) Received-SPF: pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) client-ip=210.130.202.152; Received: by mo-csw.securemx.jp (mx-mo-csw1802) id 4AT6MTm01827167; Fri, 29 Nov 2024 15:22:29 +0900 X-Iguazu-Qid: 2yAafOrBabhH3ttj97 X-Iguazu-QSIG: v=2; s=0; t=1732861349; q=2yAafOrBabhH3ttj97; m=LYxI0jO3jifroHhHj0XtEkMqELxegxB4i3YJbdU9ZcI= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1802) id 4AT6MSLJ851796 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 29 Nov 2024 15:22:28 +0900 From: Adithya Balakumar To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, kazuhiro3.hayashi@toshiba.co.jp, dinesh.kumar@toshiba-tsip.com, shivanand.kunijadar@toshiba-tsip.com, sai.sathujoda@toshiba-tsip.com, adithya.balakumar@toshiba-tsip.com Subject: [PATCH v1 1/1] image.bbclass: use oe.utils.directory_size() instead of du Date: Fri, 29 Nov 2024 11:58:26 +0530 X-TSB-HOP2: ON Message-Id: <20241129062827.527177-2-Adithya.Balakumar@toshiba-tsip.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241129062827.527177-1-Adithya.Balakumar@toshiba-tsip.com> References: <20241129062827.527177-1-Adithya.Balakumar@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 29 Nov 2024 06:22:26.0558 (UTC) FILETIME=[0F4F61E0:01DB4227] X-Original-Sender: adithya.balakumar@toshiba-tsip.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of adithya.balakumar@toshiba-tsip.com designates 210.130.202.152 as permitted sender) smtp.mailfrom=Adithya.Balakumar@toshiba-tsip.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: pXQFCa4OG86z Currently the "du" command is used to calculate the rootfs size, and sometimes the reported size of the rootfs by "du" varies across multiple builds (usually by a few kb). But the rootfs contents are reproducible. Although this does not affect any functionality, but it does affect reproducibility of artifacts that rely on the calculated rootfs size. Some of the files/directories in the rootfs has different number of blocks allocated and "du" estimates the directory size based on the allocated blocks. The files/directories affected are not always the same across builds. OE-Core uses a custom function to calculate directory size (See [1]) and this patch introduces the use of that function from oe.utils to calculate the directory size. [1] https://github.com/openembedded/openembedded-core/commit/d8f1f3a6b024a2ae6631d1ce25421e8d94b69a12 Signed-off-by: Adithya Balakumar --- meta/classes/image.bbclass | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 982523b0..3e70fe83 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -85,13 +85,10 @@ inherit image-account-extension ROOTFS_EXTRA ?= "64" def get_rootfs_size(d): - import subprocess + import subprocess, oe.utils rootfs_extra = int(d.getVar("ROOTFS_EXTRA")) - output = subprocess.check_output( - ["sudo", "du", "-xs", "--block-size=1k", d.getVar("IMAGE_ROOTFS")] - ) - base_size = int(output.split()[0]) + base_size = int(oe.utils.directory_size(d.getVar("IMAGE_ROOTFS")) / 1024) return base_size + rootfs_extra * 1024 -- 2.39.5 -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241129062827.527177-2-Adithya.Balakumar%40toshiba-tsip.com.