From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.22]) by mx.groups.io with SMTP id smtpd.web11.1414.1675360805070448305 for ; Thu, 02 Feb 2023 10:00:05 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="no key for verify" header.i=@polynum.com header.s=202006 header.b=Un+Smo3u; spf=pass (domain: sfr.fr, ip: 93.17.128.22, mailfrom: thierry.laronde@sfr.fr) X-mail-filterd: {"version":"1.6.0","queueID":"4P764z18WZz1LQKdN","contextId": "35d59a7e-f75d-41a7-aa42-e225c6e3b235"} Received: from cauchy.polynum.local (20.204.0.93.rev.sfr.net [93.0.204.20]) by msfrf2632.sfr.fr (SMTP Server) with ESMTP id 4P764z18WZz1LQKdN; Thu, 2 Feb 2023 19:00:03 +0100 (CET) X-mail-filterd: {"version":"1.6.0","queueID":"4P764y3bGDz1LQKdB","contextId": "8312ba93-1c93-43ea-bb7f-dc0e981b63db"} X-sfr-mailing: LEGIT X-sfr-spamrating: 36 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=polynum.com; s=202006; t=1675360803; h=Date:From:To:Cc:Subject:References:In-Reply-To; bh=caE+jeAuL1 c3CnONtP+5IwEAPPmR2DhrTAi4MbxKDfw=; b=Un+Smo3umIseRi8WlYFfGDgmsfGTonuwpFaVHh ly5fp8HFgEtdg4MC5mPM3eUk5mCIkmEf0WdJnTUr4w+3l+hN0ra1Va31k3Fx9QAIUauyQnqFWGl5 epFTBw/KrCqn7MbDCc8b8rLD/Y+RcP0rTzvkHhGVz9QDvJNQZToXP6vr+0x3ZNdMJoRPNr0BxZzr VrVAa36jjoKKAgiaMhMSkHnTYgs6cEowL5FOGuST2nIx87TwWzlxi0LT543Ax8KoPc7/PiaISAYu 2ynqfii6ElO6GBaWp+396zU7lAxXzK/O8GFbSS0ENCq2dj8syIkc+hKCCLuMpbaVmoKA2VS/IubQ == Received: from cauchy.polynum.local (20.204.0.93.rev.sfr.net [93.0.204.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: thierry.laronde@sfr.fr) by msfrf2632.sfr.fr (SMTP Server) with ESMTPSA id 4P764y3bGDz1LQKdB; Thu, 2 Feb 2023 19:00:02 +0100 (CET) Authentication-Results: sfr.fr; auth=pass (LOGIN) smtp.auth=thierry.laronde@sfr.fr Received: from cauchy.polynum.local (localhost [127.0.0.1]) by cauchy.polynum.local (8.15.2/8.15.2) with ESMTP id 312I00ZZ001847; Thu, 2 Feb 2023 19:00:00 +0100 (CET) Received: (from tlaronde@localhost) by cauchy.polynum.local (8.15.2/8.14.9/Submit) id 312HxxB7026815; Thu, 2 Feb 2023 18:59:59 +0100 (CET) X-Authentication-Warning: cauchy.polynum.local: tlaronde set sender to thierry.laronde@sfr.fr using -f Date: Thu, 2 Feb 2023 18:59:59 +0100 From: "tlaronde@polynum.com" To: Gerd Hoffmann Cc: devel@edk2.groups.io, Andrew Fish , Leif Lindholm , Michael D Kinney Subject: Re: [edk2-devel] edk2setup.sh shortcomings Message-ID: References: <20230202165032.e2kvjxsntrmhc3ue@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: <20230202165032.e2kvjxsntrmhc3ue@sirius.home.kraxel.org> Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Le Thu, Feb 02, 2023 at 05:50:32PM +0100, Gerd Hoffmann a =E9crit : > On Thu, Feb 02, 2023 at 12:29:32PM +0100, tlaronde@polynum.com wrote: > > edk2setup.sh has shortcomings. To list some: > >=20 > > - The functions return a status but it is not tested; hence the > > script goes to the end with a final "return $?" that simply > > returns the status of the last command that is "unset" which > > always successfully unsets, even a not set variable. Hence a > > script can not catch a failure by testing the end status that is > > always 0; > > - If WORKSPACE is set, --reconfig does nothing; > > - If EDK_TOOLS_PATH and PACKAGES_PATH are set, even to incorrect > > values, the script succeeds even if BaseTools/ is not found > > anywhere; > > - The comments are obsolete (1): bash(1) is required because the syn= tax > > is not POSIX.2 sh(1) compliant and because some Makefile recipes > > have "bash'isms" (indeed, a GMAKE variable should be exported > > with a definition of "/path/to/gnu/make SHELL=3D/path/to/bash" and > > a canonical call should be "$GMAKE ..."); > > - The comments are obsolete (2): CYGWIN is not treated in anyway > > specifically and, on the contrary, the regexp translation of ':' > > in spaces for PACKAGES_PATH would be sure to create a mess with > > a MS Windows like path; > > - The settings have obviously evolved and the help message does not > > list all the variables that can be set and that do modify the > > way the setting is done; > > - Some commands (notably whereis(1)) are not standard utilities, not > > to be found on all Unix like systems and, even if found, have > > greatly diverging behaviors. > >=20 > > What is the preferred procedure? >=20 > Ignore it and to just use BaseTools/BuildEnv directly? > I'm not fully sure what value it adds ... That's the problem: it does not add much, but it adds some things and the problem (for me) is to know if these are used or not: 1) It exports PYTHONHASHSEED=3D1 (needed?); 2) Undocumented features allow to use something else instead of BaseTools/BuildEnv... I also think that it would be far better to state clearly what is needed (including with BaseTools/BuildEnv and the like) and let builders simply set the correct environment with defined variables being used afterwards (MAKE, SHELL, PYTHON and so on). To state, for example the Python major version required and that everything depends on GNU make and bash(1) (hence the /path/to/gnu/make SHELL=3D/path/to/bash invocation) and that would be it. But: who uses it (edk2setup.sh) and with what? This question, I can not answer, obviously... >=20 > > Should I file BZ to list all the > > problems so that someone authorized may address them? Or can I propos= e > > a patch to address these (keeping it backward compatible with a prese= nt > > correct use) with a reasonable hope that, as an exception that will n= ot > > become a rule, it will not be ignored? >=20 > Sending patches has a much higher chance to succeed, although there is > no guarantee unfortunately. Hum... There is a very lethal weapon actually in use: the pillow. I already sent various patches and they are silently ignored... If my contribution will be ignored as others have been till now, honesty should be to clearly state: "we don't care and we won't care" so that I can use my time trying to solve the problems I want to address at a=20 different level than UEFI... Best, --=20 Thierry Laronde http://www.kergis.com/ http://kertex.kergis.com/ Key fingerprint =3D 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C