* [PATCH 1/1] BaseTools: Change RealPath to AbsPath
@ 2021-09-16 6:59 Yuwei Chen
2021-09-17 1:10 ` 回复: " gaoliming
0 siblings, 1 reply; 2+ messages in thread
From: Yuwei Chen @ 2021-09-16 6:59 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao
Currently the realpath is used when parse modules, which shows the
path with a drive letter in build log. In Windows 'subst' comand is
used to associates a path with a drive letter, when use the mapped
drive letter for build, with realpath function the build log will
have different disk letter info which will cause confusion. In this
situation, if use adspath function to show the path info, it will keep
same letter with the mapped drive letter, which avoids confusion.
This patch modifies the realpath to abspath.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
---
BaseTools/Source/Python/GenFds/FfsInfStatement.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index 20573ca28d2f..568efb6d7685 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -707,8 +707,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
FileName,
'DEBUG'
)
- OutputPath = os.path.realpath(OutputPath)
- DebugPath = os.path.realpath(DebugPath)
+ OutputPath = os.path.abspath(OutputPath)
+ DebugPath = os.path.abspath(DebugPath)
return OutputPath, DebugPath
## __GenSimpleFileSection__() method
--
2.26.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* 回复: [PATCH 1/1] BaseTools: Change RealPath to AbsPath
2021-09-16 6:59 [PATCH 1/1] BaseTools: Change RealPath to AbsPath Yuwei Chen
@ 2021-09-17 1:10 ` gaoliming
0 siblings, 0 replies; 2+ messages in thread
From: gaoliming @ 2021-09-17 1:10 UTC (permalink / raw)
To: 'Yuwei Chen', devel; +Cc: 'Bob Feng'
Is there any other case to use RealPath in BaseTools? Or, have you confirm
that all RealPath usage have been removed?
Liming
> -----邮件原件-----
> 发件人: Yuwei Chen <yuwei.chen@intel.com>
> 发送时间: 2021年9月16日 14:59
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> 主题: [PATCH 1/1] BaseTools: Change RealPath to AbsPath
>
> Currently the realpath is used when parse modules, which shows the
> path with a drive letter in build log. In Windows 'subst' comand is
> used to associates a path with a drive letter, when use the mapped
> drive letter for build, with realpath function the build log will
> have different disk letter info which will cause confusion. In this
> situation, if use adspath function to show the path info, it will keep
> same letter with the mapped drive letter, which avoids confusion.
> This patch modifies the realpath to abspath.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
> ---
> BaseTools/Source/Python/GenFds/FfsInfStatement.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
> b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
> index 20573ca28d2f..568efb6d7685 100644
> --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
> +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
> @@ -707,8 +707,8 @@ class FfsInfStatement(FfsInfStatementClassObject):
> FileName,
> 'DEBUG'
> )
> - OutputPath = os.path.realpath(OutputPath)
> - DebugPath = os.path.realpath(DebugPath)
> + OutputPath = os.path.abspath(OutputPath)
> + DebugPath = os.path.abspath(DebugPath)
> return OutputPath, DebugPath
>
> ## __GenSimpleFileSection__() method
> --
> 2.26.1.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-17 1:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-16 6:59 [PATCH 1/1] BaseTools: Change RealPath to AbsPath Yuwei Chen
2021-09-17 1:10 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox