From patchwork Mon Feb 17 05:39:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hongxu Jia X-Patchwork-Id: 57439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1BE4C021A4 for ; Mon, 17 Feb 2025 05:39:37 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web10.45204.1739770772069402915 for ; Sun, 16 Feb 2025 21:39:32 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=4143913a06=hongxu.jia@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 51H4qJiH031683 for ; Mon, 17 Feb 2025 05:39:31 GMT Received: from ala-exchng02.corp.ad.wrs.com (ala-exchng02.wrs.com [147.11.82.254]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 44tg51hn6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 17 Feb 2025 05:39:31 +0000 (GMT) Received: from ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.43; Sun, 16 Feb 2025 21:39:29 -0800 Received: from pek-lpg-core5.wrs.com (147.11.136.210) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server id 15.1.2507.43 via Frontend Transport; Sun, 16 Feb 2025 21:39:29 -0800 From: Hongxu Jia To: Subject: [PATCH] setuptools3-base.bbclass: set SETUPTOOLS_SCM_SUBPROCESS_TIMEOUT to override the subprocess timeout Date: Mon, 17 Feb 2025 13:39:28 +0800 Message-ID: <20250217053928.3295113-1-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=T4B2T+KQ c=1 sm=1 tr=0 ts=67b2cb93 cx=c_pps a=K4BcnWQioVPsTJd46EJO2w==:117 a=K4BcnWQioVPsTJd46EJO2w==:17 a=IkcTkHD0fZMA:10 a=T2h4t0Lz3GQA:10 a=NEAV23lmAAAA:8 a=t7CeM3EgAAAA:8 a=yC98PdH4yJKnai7kuSsA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: wWr5xM3sgC8mmL-yh_gaEvRiLK0_tHxj X-Proofpoint-ORIG-GUID: wWr5xM3sgC8mmL-yh_gaEvRiLK0_tHxj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-17_02,2025-02-13_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 mlxscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 spamscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.21.0-2501170000 definitions=main-2502170047 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0064b401.pphosted.com id 51H4qJiH031683 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 17 Feb 2025 05:39:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/211510 The environment variable SETUPTOOLS_SCM_SUBPROCESS_TIMEOUT allows to override the subprocess timeout. The default is 40 seconds and should work for most needs.[1] However, it was not enough while using git shallow tarball and starting multiple Yocto world builds in one host. |   File "tmp/work/x86_64-linux/python3-scancode-native/32.1.0/recipe-sysroot-native/usr/lib/python3.13/subprocess.py", line 1263, in _check_timeout |     raise TimeoutExpired( |     ...<2 lines>... |             stderr=b''.join(stderr_seq) if stderr_seq else None) | subprocess.TimeoutExpired: Command '['git', '--git-dir', 'tmp/work/x86_64-linux/python3-scancode-native/32.1.0/git/.git', 'status', '--porcelain', '--untracked-files=no']' timed out after 40 seconds Explicitly set variable SETUPTOOLS_SCM_SUBPROCESS_TIMEOUT to 600s in bbclass, and we could override it in local.conf [1] https://github.com/pypa/setuptools-scm/blob/main/docs/overrides.md#subprocess-timeouts Signed-off-by: Hongxu Jia --- meta/classes-recipe/setuptools3-base.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes-recipe/setuptools3-base.bbclass b/meta/classes-recipe/setuptools3-base.bbclass index 27af6abc58..190d9e6e3a 100644 --- a/meta/classes-recipe/setuptools3-base.bbclass +++ b/meta/classes-recipe/setuptools3-base.bbclass @@ -23,6 +23,10 @@ export CCSHARED = "-fPIC -DPIC" # the python executable export LINKFORSHARED = "${SECURITY_CFLAGS} -Xlinker -export-dynamic" +# The environment variable SETUPTOOLS_SCM_SUBPROCESS_TIMEOUT allows +# to override the subprocess timeout. +export SETUPTOOLS_SCM_SUBPROCESS_TIMEOUT ??= "600" + FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"