From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A07D0158089 for ; Wed, 13 Sep 2023 21:06:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30DDE2BC021; Wed, 13 Sep 2023 21:06:38 +0000 (UTC) Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BBD412BC019 for ; Wed, 13 Sep 2023 21:06:37 +0000 (UTC) Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-1d577c89a4fso159119fac.1 for ; Wed, 13 Sep 2023 14:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694639197; x=1695243997; darn=lists.gentoo.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2TOOXSX4pKMOugRtiFt82bFAZoQhZ0nEJ/Vv7L01bC8=; b=sQ/OGEoez2s/XtGpKUQxyBLR10eUuBUfMZi/brxWEDZGqaiyLxBsG1ULVFfvjsMpQF hHWboUWnPc2t3WgeYJKITP0gXr5Kv83Vpv0XpVO6ccXhgH+ylg5sQxpCig+PxfsxYWYI T+QIed1aOBitHnniFJBtQYIStbPrnugKBtJQ5N4b5Xrqm/cZNRDJzHaWvTwvq2ApPnE9 oI/l2OIFICXX+KoFsts6J12Y3kP59mAkumP4e5Y8+h/3Gz+XZPXeYlR84o0ibWHkkO9M cAQsAg/helTgdAAFfZaYVeEhlEzEWazbJNStBjR9IqwHUrDvZy0nPZ3bKg4MMZy4GgjF 0niQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694639197; x=1695243997; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2TOOXSX4pKMOugRtiFt82bFAZoQhZ0nEJ/Vv7L01bC8=; b=UGleKPg9Yu+tUJ3XvVVGKTe2ijA8h9v+2rQ7dZReRH91sHK4y0Y6zjNYDR6sVddaQ5 5Jq5tJENVKBI/P+FgUyWNgQNxFa4Gd+sFyjOwYOxyXuYDMal52vS1rkjEDMsXVGKcWSg 5uoG8RKVZtOGV0dEaiNETe/CbPIKevJeMZr10r+88bi7dBXZgalFCVliaeFSa4icAFv6 ZuASrT/G7i5lBG1z8+ZYjMDcAcnV3qGrMHnvNtQSXjkBuxkcP9sFj7AnBkegOUD58szF 7u7mcHbRhquLqKZmHqqEyMV3h1J4GTvzM082jvsbeOFeeWuu4yNOtutw37H2O94/Q1dE +Zgw== X-Gm-Message-State: AOJu0Yz6VF7NsbtfEvNvFx8uZHBsr+E+wDcXedV9fvQFhiinUeyf9gio aDSbPTTyJByYTTc9+CSsWC4= X-Google-Smtp-Source: AGHT+IHFSpxkFOQEZk+vwJzTE70f6msUNvQuEa+UWeD0NxcFJPuhOmBVkB3tWUHXJAMfEi/VNR06Gw== X-Received: by 2002:a05:6870:7a9:b0:1c8:b870:4e62 with SMTP id en41-20020a05687007a900b001c8b8704e62mr3522370oab.52.1694639196719; Wed, 13 Sep 2023 14:06:36 -0700 (PDT) Received: from ?IPV6:2600:1700:57f0:ca20:b42b:533b:c0b4:7cc9? ([2600:1700:57f0:ca20:b42b:533b:c0b4:7cc9]) by smtp.gmail.com with ESMTPSA id ef1-20020a0568701a8100b001d58463f821sm89654oab.14.2023.09.13.14.06.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 14:06:36 -0700 (PDT) Message-ID: <54b962d5-2659-2a15-385a-fa314a81ffe8@gmail.com> Date: Wed, 13 Sep 2023 17:06:35 -0400 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [gentoo-dev] [PATCH 1/2] distutils-r1.eclass: teach setuptools to respect (some) build options Content-Language: en-US To: Ulrich Mueller Cc: gentoo-dev@lists.gentoo.org References: <20230912191501.536700-1-eschwartz93@gmail.com> <1affddb8-221c-4c67-4395-03c2425d0e0e@gmail.com> From: Eli Schwartz In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 64a9594c-409d-44d3-9874-cea7f379ae23 X-Archives-Hash: 9911ec056de13d972931439323a1436d On 9/13/23 5:27 AM, Ulrich Mueller wrote: >>>>>> On Wed, 13 Sep 2023, Eli Schwartz wrote: > >>> "|| die" should also be added for the cat command. > >> Redirecting output to a file in a directory you have just guaranteed >> to exist cannot fail. > > That's a rather bold statement. I can imagine a number of possible > failures, e.g. no space left on device, quota exceeded, or a low-level > I/O error of the filesystem. Also fork or exec of the cat command could > fail (e.g. out of memory). > > While either of these may be unlikely here, best practice is to check > for errors of _all_ external commands. The implementation of `die` performs a fork+exec of the sed command, invokes eerror (many times!) which forks to pipe, invokes $() which forks, and could behave abnormally due to out of memory. It is not safe to treat `|| die` as error recovery for an out of memory condition. The implementation of `die` performs multiple writes to files inside of ${PORTAGE_BUILDDIR}, and could behave abnormally due to write failures. It is not safe to treat `|| die` as error recovery for a write failure of the ${PORTAGE_BUILDDIR} drive (whatever the reason for that write failure). Regarding: - no space left on device - quota exceeded - low-level I/O error of the filesystem this isn't "a number of possible failures" :) it is the same failure but elicited by different prompts. Regarding this, I have already commented... (And the `|| die` is added to the next revision of this patch either way.) -- Eli Schwartz