From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.243]) by mx.groups.io with SMTP id smtpd.web12.14753.1598971344467780572 for ; Tue, 01 Sep 2020 07:42:25 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.243, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([116.233.155.155]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 01 Sep 2020 22:42:18 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Yuwei Chen'" , "'Shenglei Zhang'" References: <20200901102315.38840-1-bob.c.feng@intel.com> In-Reply-To: <20200901102315.38840-1-bob.c.feng@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoIFYyXSBCYXNlVG9vbHMvRWNjOiBGaXggYW4gaXNzdWUgb2YgcGF0aCBzZXBhcmF0b3IgY29tcGF0aWJpbGl0eQ==?= Date: Tue, 1 Sep 2020 22:42:09 +0800 Message-ID: <003f01d6806e$1885ad20$49910760$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHqPvJ7Q3TbrIYwjtu9r+Hh4uAMNqksXjrA Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+64887+4905953+8761045@groups.io > =B4=FA=B1=ED Bob Feng > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA9=D4=C21=C8=D5 18:23 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Liming Gao ; Yuwei Chen > ; Shenglei Zhang > =D6=F7=CC=E2: [edk2-devel] [Patch V2] BaseTools/Ecc: Fix an issue of pat= h separator > compatibility >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2904 >=20 > The path separator is different in Windows and Linux, the > original code does not handle this difference. This patch > is to fix this issue. >=20 > Signed-off-by: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Cc: Shenglei Zhang > --- > V2 > Change to a better method to get path separator. >=20 > BaseTools/Source/Python/Ecc/Check.py | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/Ecc/Check.py > b/BaseTools/Source/Python/Ecc/Check.py > index 0fdc7e35c1..6087abfa4d 100644 > --- a/BaseTools/Source/Python/Ecc/Check.py > +++ b/BaseTools/Source/Python/Ecc/Check.py > @@ -1101,15 +1101,15 @@ class Check(object): > for Item in InfPathSet: > if Item[0] not in InfPathList: > InfPathList.append(Item[0]) > SqlCommand =3D """ > select ID, Path, FullPath from File where > upper(FullPath) not in > - (select upper(A.Path) || '\\' || > upper(B.Value1) from File as A, INF as B > + (select upper(A.Path) || '%s' || > upper(B.Value1) from File as A, INF as B > where A.ID in (select BelongsToFile from > INF where Model =3D %s group by BelongsToFile) and > B.BelongsToFile =3D A.ID and B.Model =3D %s= ) > and (Model =3D %s or Model =3D %s) > - """ % (MODEL_EFI_SOURCE_FILE, > MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H) > + """ % (os.sep, MODEL_EFI_SOURCE_FILE, > MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H) > RecordSet =3D EccGlobalData.gDb.TblInf.Exec(SqlCommand) > for Record in RecordSet: > Path =3D Record[1] > Path =3D Path.upper().replace('\X64', '').replace('\IA3= 2', > '').replace('\EBC', '').replace('\IPF', '').replace('\ARM', '') > if Path in InfPathList: > @@ -1130,13 +1130,13 @@ class Check(object): > if Pcd[3]: > PcdName =3D Pcd[3] > BelongsToFile =3D Pcd[4] > SqlCommand =3D """ > select ID from File where FullPath in > - (select B.Path || '\\' || A.Value1 from INF > as A, File as B where A.Model =3D %s and A.BelongsToFile =3D %s > + (select B.Path || '%s' || A.Value1 from > INF as A, File as B where A.Model =3D %s and A.BelongsToFile =3D %s > and B.ID =3D %s and (B.Model =3D %s or > B.Model =3D %s)) > - """ % (MODEL_EFI_SOURCE_FILE, > BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H) > + """ % (os.sep, > MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, > MODEL_FILE_H) > TableSet =3D > EccGlobalData.gDb.TblFile.Exec(SqlCommand) > for Tbl in TableSet: > TblName =3D 'Identifier' + str(Tbl[0]) > SqlCommand =3D """ > select Name, ID from %s where > value like '%s' and Model =3D %s > -- > 2.20.1.windows.1 >=20 >=20 >=20