public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
To: <devel@edk2.groups.io>, <joeyvagedes@microsoft.com>
Cc: "'Rebecca Cran'" <rebecca@bsdio.com>,
	"'Bob Feng'" <bob.c.feng@intel.com>,
	"'Yuwei Chen'" <yuwei.chen@intel.com>
Subject: 回复: [edk2-devel] [PATCH v1 1/1] BaseTools: InfBuildData: Fix Private value retrieval
Date: Thu, 14 Mar 2024 22:45:36 +0800	[thread overview]
Message-ID: <034601da761e$46ad7440$d4085cc0$@byosoft.com.cn> (raw)
In-Reply-To: <20240313151507.1287-1-joey.vagedes@gmail.com>

This change is good to me. Reviewed-by: Liming Gao
<gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Joey Vagedes
> via groups.io
> 发送时间: 2024年3月13日 23:15
> 收件人: devel@edk2.groups.io
> 抄送: Rebecca Cran <rebecca@bsdio.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Bob Feng <bob.c.feng@intel.com>; Yuwei Chen
> <yuwei.chen@intel.com>
> 主题: [edk2-devel] [PATCH v1 1/1] BaseTools: InfBuildData: Fix Private
value
> retrieval
> 
> Update retrieval of private guids, protocols, or ppis from a package's
> declaration file to use the original path of the module's INF file
> rather than the current path. When building the same module multiple
> times in the same INF (by override the define's FILE_GUID), a temporary
> instance of the module is generated outside the package, causing the
> retrieval of private values to fail as the check to access private
> values is done by verifying the module to build, is inside the package.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4730
> 
> Signed-off-by: Joey Vagedes <Joey.Vagedes@gmail.com>
> 
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
>  BaseTools/Source/Python/Workspace/InfBuildData.py | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py
> b/BaseTools/Source/Python/Workspace/InfBuildData.py
> index e4ff1c668666..6339e494ca87 100644
> --- a/BaseTools/Source/Python/Workspace/InfBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
> @@ -592,7 +592,7 @@ class InfBuildData(ModuleBuildClassObject):
>          RecordList = self._RawData[MODEL_EFI_PROTOCOL, self._Arch,
> self._Platform]
> 
>          for Record in RecordList:
> 
>              CName = Record[0]
> 
> -            Value = _ProtocolValue(CName, self.Packages,
> self.MetaFile.Path)
> 
> +            Value = _ProtocolValue(CName, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>              if Value is None:
> 
>                  PackageList = "\n\t".join(str(P) for P in self.Packages)
> 
>                  EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
> 
> @@ -616,7 +616,7 @@ class InfBuildData(ModuleBuildClassObject):
>          RecordList = self._RawData[MODEL_EFI_PPI, self._Arch,
> self._Platform]
> 
>          for Record in RecordList:
> 
>              CName = Record[0]
> 
> -            Value = _PpiValue(CName, self.Packages, self.MetaFile.Path)
> 
> +            Value = _PpiValue(CName, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>              if Value is None:
> 
>                  PackageList = "\n\t".join(str(P) for P in self.Packages)
> 
>                  EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
> 
> @@ -640,7 +640,7 @@ class InfBuildData(ModuleBuildClassObject):
>          RecordList = self._RawData[MODEL_EFI_GUID, self._Arch,
> self._Platform]
> 
>          for Record in RecordList:
> 
>              CName = Record[0]
> 
> -            Value = GuidValue(CName, self.Packages, self.MetaFile.Path)
> 
> +            Value = GuidValue(CName, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>              if Value is None:
> 
>                  PackageList = "\n\t".join(str(P) for P in self.Packages)
> 
>                  EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
> 
> @@ -655,7 +655,7 @@ class InfBuildData(ModuleBuildClassObject):
>              for TokenSpaceGuid, _, _, _, _, _, LineNo in RecordList:
> 
>                  # get the guid value
> 
>                  if TokenSpaceGuid not in RetVal:
> 
> -                    Value = GuidValue(TokenSpaceGuid, self.Packages,
> self.MetaFile.Path)
> 
> +                    Value = GuidValue(TokenSpaceGuid, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>                      if Value is None:
> 
>                          PackageList = "\n\t".join(str(P) for P in
> self.Packages)
> 
>                          EdkLogger.error('build',
> RESOURCE_NOT_AVAILABLE,
> 
> @@ -818,11 +818,11 @@ class InfBuildData(ModuleBuildClassObject):
>                          Value = Token
> 
>                      else:
> 
>                          # get the GUID value now
> 
> -                        Value = _ProtocolValue(Token, self.Packages,
> self.MetaFile.Path)
> 
> +                        Value = _ProtocolValue(Token, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>                          if Value is None:
> 
> -                            Value = _PpiValue(Token, self.Packages,
> self.MetaFile.Path)
> 
> +                            Value = _PpiValue(Token, self.Packages,
> self.MetaFile.OriginalPath.Path)
> 
>                              if Value is None:
> 
> -                                Value = GuidValue(Token,
> self.Packages, self.MetaFile.Path)
> 
> +                                Value = GuidValue(Token,
> self.Packages, self.MetaFile.OriginalPath.Path)
> 
> 
> 
>                      if Value is None:
> 
>                          PackageList = "\n\t".join(str(P) for P in
> self.Packages)
> 
> --
> 2.40.1.vfs.0.0
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#116716):
> https://edk2.groups.io/g/devel/message/116716
> Mute This Topic: https://groups.io/mt/104907485/4905953
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116757): https://edk2.groups.io/g/devel/message/116757
Mute This Topic: https://groups.io/mt/104927681/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



           reply	other threads:[~2024-03-14 14:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20240313151507.1287-1-joey.vagedes@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='034601da761e$46ad7440$d4085cc0$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox