On Thu, Feb 02, 2023 at 12:29:32PM +0100, tlaro...@polynum.com wrote:
> edk2setup.sh has shortcomings. To list some:
> 
>       - 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 syntax
>         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=/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.
> 
> What is the preferred procedure?

Ignore it and to just use BaseTools/BuildEnv directly?
I'm not fully sure what value it adds ...

> Should I file BZ to list all the
> problems so that someone authorized may address them? Or can I propose
> a patch to address these (keeping it backward compatible with a present
> correct use) with a reasonable hope that, as an exception that will not
> become a rule, it will not be ignored?

Sending patches has a much higher chance to succeed, although there is
no guarantee unfortunately.

I'd start with removing code:  The python handling it adds should be
obsolete, python2 is EOL and I think meanwhile the python tools require
python3 anyway.  So all that can probably replaced with "export
PYTHON_COMMAND=python3".

Leaves less code which needs actual fixing ;)

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99490): https://edk2.groups.io/g/devel/message/99490
Mute This Topic: https://groups.io/mt/96697952/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to