Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: bff9815b616669f1cf743e412bc0000efe22dfb4
      
https://github.com/tianocore/edk2/commit/bff9815b616669f1cf743e412bc0000efe22dfb4
  Author: Michael Kubacki <michael.kuba...@microsoft.com>
  Date:   2024-03-04 (Mon, 04 Mar 2024)

  Changed paths:
    M BaseTools/Source/Python/GenFds/FfsInfStatement.py

  Log Message:
  -----------
  BaseTools/GenFds: Resolve absolute workspace INF paths

Currently, if an INF path is an absolute path on Linux (begins with
"/"), the "/" character will be removed. If the path is an absolute
system path, this creates an invalid path.

An example of when this may be an issue is in external dependencies
where an INF is within the external dependency, the `set_build_var`
flag is set, and DSC files refer to files by its build variable
(e.g. `$(SHARED_BINARIES)/Module.inf`). INFs in a binary distribution
like this example may contain a [Binaries] section and refer to
different section files that can be used by a platform to compose an
FFS file. For example, the PE32 (.efi) and DEPEX (.depex) files.

In this case, `$(SHARED_BINARIES)` will be an absolute path to the
ext dep directory and `FfsInfStatement.__InfParse__` will remove the
leading "/" character so the path is invalid.

This change first checks if the absolute path will resolve into the
current workspace. If it does (as will happen in the shared crypto
ext dep example above), it modifies the path to be relative to the
workspace so later logic dependent on relative paths can operate on
it. If the absolute path is not within the current workspace, it
follows previous behavior for backward compatibility to that
scenario.

Cc: Rebecca Cran <rebe...@bsdio.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Bob Feng <bob.c.f...@intel.com>
Cc: Yuwei Chen <yuwei.c...@intel.com>
Signed-off-by: Michael Kubacki <michael.kuba...@microsoft.com>
Reviewed-by: Rebecca Cran <rebe...@bsdio.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to